4namespace sysio {
namespace chain {
18 vector<signature_type> extract_additional_signatures(
const signed_block_ptr& b,
19 const protocol_feature_set& pfs,
22 auto exts = b->validate_and_extract_extensions();
24 if ( exts.count(additional_sigs_eid) > 0 ) {
25 auto& additional_sigs = std::get<additional_block_signatures_extension>(exts.lower_bound(additional_sigs_eid)->second);
27 return std::move(additional_sigs.signatures);
49 template<
typename ...Extras>
50 block_header_state inject_additional_signatures( pending_block_header_state&& cur,
52 const protocol_feature_set& pfs,
55 auto pfa = cur.prev_activated_protocol_features;
56 block_header_state result = std::move(cur).finish_next(b, pfs, std::forward<Extras>(extras)...);
58 if (!result.additional_signatures.empty()) {
62 "Block has multiple signatures before activation of WTMsig Block Signatures");
81 const flat_set<digest_type>&,
83 bool skip_validate_signee
85 :
block_header_state( prev.next( *b, extract_additional_signatures(b, pfs, prev.activated_protocol_features), pfs, validator, skip_validate_signee ) )
86 ,block(
std::move(b) )
94 const flat_set<digest_type>&,
99 ,block(
std::move(b) )
100 ,_pub_keys_recovered( true )
101 ,_cached_trxs(
std::move(trx_metas) )
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
void pack(Stream &s, const std::deque< T > &value)
bool is_builtin_activated(const protocol_feature_activation_set_ptr &pfa, const protocol_feature_set &pfs, builtin_protocol_feature_t feature_codename)
std::function< std::vector< signature_type >(const digest_type &)> signer_callback_type
@ wtmsig_block_signatures
auto emplace_extension(extensions_type &exts, uint16_t eid, vector< char > &&data)
key Invalid authority Invalid transaction Invalid block ID Invalid packed transaction Invalid chain ID Invalid symbol Signature type is not a currently activated type Block can not be found block_validate_exception
std::shared_ptr< signed_block > signed_block_ptr
std::shared_ptr< protocol_feature_activation_set > protocol_feature_activation_set_ptr
defines visit functions for T Unless this is specialized, visit() will not be defined for T.
static constexpr uint16_t extension_id()
vector< signature_type > signatures