Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::protocol_feature_activation_set Struct Reference

#include <protocol_feature_activation.hpp>

Collaboration diagram for sysio::chain::protocol_feature_activation_set:

Public Member Functions

 protocol_feature_activation_set ()=default
 
 protocol_feature_activation_set (const protocol_feature_activation_set &orig_pfa_set, vector< digest_type > additional_features, bool enforce_disjoint=true)
 

Public Attributes

flat_set< digest_typeprotocol_features
 

Detailed Description

Definition at line 36 of file protocol_feature_activation.hpp.

Constructor & Destructor Documentation

◆ protocol_feature_activation_set() [1/2]

sysio::chain::protocol_feature_activation_set::protocol_feature_activation_set ( )
default

◆ protocol_feature_activation_set() [2/2]

sysio::chain::protocol_feature_activation_set::protocol_feature_activation_set ( const protocol_feature_activation_set & orig_pfa_set,
vector< digest_type > additional_features,
bool enforce_disjoint = true )

Definition at line 28 of file protocol_feature_activation.cpp.

33 {
34 std::sort( additional_features.begin(), additional_features.end() );
35
36 const auto& s1 = orig_pfa_set.protocol_features;
37 const auto& s2 = additional_features;
38
39 auto expected_size = s1.size() + s2.size();
40 protocol_features.reserve( expected_size );
41
42 std::set_union( s1.cbegin(), s1.cend(), s2.cbegin(), s2.cend(), end_inserter( protocol_features ) );
43
44 SYS_ASSERT( !enforce_disjoint || protocol_features.size() == expected_size,
45 invalid_block_header_extension,
46 "duplication of protocol feature digests"
47 );
48 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
end_insert_iterator< Container > end_inserter(Container &c)
Definition types.hpp:303
Here is the call graph for this function:

Member Data Documentation

◆ protocol_features

flat_set<digest_type> sysio::chain::protocol_feature_activation_set::protocol_features

Definition at line 37 of file protocol_feature_activation.hpp.


The documentation for this struct was generated from the following files: