Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
protocol_state_object.cpp
Go to the documentation of this file.
2
3namespace sysio { namespace chain {
4
5 namespace detail {
6
7 snapshot_protocol_state_object
9 const chainbase::database& db )
10 {
12
13 res.activated_protocol_features.reserve( value.activated_protocol_features.size() );
14 for( const auto& v : value.activated_protocol_features ) {
15 res.activated_protocol_features.emplace_back( v );
16 }
17
18 res.preactivated_protocol_features.reserve( value.preactivated_protocol_features.size() );
19 for( const auto& v : value.preactivated_protocol_features ) {
20 res.preactivated_protocol_features.emplace_back( v );
21 }
22
24
25 res.num_supported_key_types = value.num_supported_key_types;
26
27 return res;
28 }
29
30 void
34 {
35 value.activated_protocol_features.clear();
36 value.activated_protocol_features.reserve( row.activated_protocol_features.size() );
37 for( const auto& v : row.activated_protocol_features ) {
38 value.activated_protocol_features.emplace_back( v );
39 }
40
41 value.preactivated_protocol_features.clear();
42 value.preactivated_protocol_features.reserve( row.preactivated_protocol_features.size() );
43 for( const auto& v : row.preactivated_protocol_features ) {
44 value.preactivated_protocol_features.emplace_back( v );
45 }
46
47 reset_intrinsic_whitelist( value.whitelisted_intrinsics, row.whitelisted_intrinsics );
48
49 value.num_supported_key_types = row.num_supported_key_types;
50 }
51
52 }
53
54}}
Maintains global state information about consensus protocol rules.
void reset_intrinsic_whitelist(whitelisted_intrinsics_type &whitelisted_intrinsics, const std::set< std::string > &s)
std::set< std::string > convert_intrinsic_whitelist_to_set(const whitelisted_intrinsics_type &whitelisted_intrinsics)
#define value
Definition pkcs11.h:157
static const snapshot_type & to_snapshot_row(const value_type &value, const chainbase::database &)
Definition snapshot.hpp:29
vector< protocol_state_object::activated_protocol_feature > activated_protocol_features