Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
protocol_state_object.hpp
Go to the documentation of this file.
1#pragma once
2
8
9namespace sysio { namespace chain {
10
17 class protocol_state_object : public chainbase::object<protocol_state_object_type, protocol_state_object>
18 {
20
21 public:
22 struct activated_protocol_feature {
23 digest_type feature_digest;
24 uint32_t activation_block_num = 0;
25
26 activated_protocol_feature() = default;
27
28 activated_protocol_feature( const digest_type& feature_digest, uint32_t activation_block_num )
29 :feature_digest( feature_digest )
30 ,activation_block_num( activation_block_num )
31 {}
32
33 bool operator==(const activated_protocol_feature& rhs) const {
34 return feature_digest == rhs.feature_digest && activation_block_num == rhs.activation_block_num;
35 }
36 };
37
38 public:
44 };
45
48 indexed_by<
49 ordered_unique<tag<by_id>,
50 BOOST_MULTI_INDEX_MEMBER(protocol_state_object, protocol_state_object::id_type, id)
51 >
52 >
53 >;
54
61
62 namespace detail {
63 template<>
75 }
76
77}}
78
80
81FC_REFLECT(sysio::chain::protocol_state_object::activated_protocol_feature,
82 (feature_digest)(activation_block_num)
83 )
84
86 (activated_protocol_features)(preactivated_protocol_features)(whitelisted_intrinsics)(num_supported_key_types)
87 )
88
90 (activated_protocol_features)(preactivated_protocol_features)(whitelisted_intrinsics)(num_supported_key_types)
91 )
#define OBJECT_CTOR(...)
Definition types.hpp:39
#define CHAINBASE_SET_INDEX_TYPE(OBJECT_TYPE, INDEX_TYPE)
Maintains global state information about consensus protocol rules.
whitelisted_intrinsics_type whitelisted_intrinsics
shared_vector< activated_protocol_feature > activated_protocol_features
shared_vector< digest_type > preactivated_protocol_features
bool operator==(const environment &other)
boost::multi_index_container< Object, Args..., chainbase::node_allocator< Object > > shared_multi_index_container
boost::interprocess::vector< T, allocator< T > > shared_vector
Definition types.hpp:85
chainbase::shared_multi_index_container< protocol_state_object, indexed_by< ordered_unique< tag< by_id >, > > > protocol_state_multi_index
shared_flat_multimap< uint64_t, shared_string > whitelisted_intrinsics_type
#define value
Definition pkcs11.h:157
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311
unsigned int uint32_t
Definition stdint.h:126
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