Skip to content

Commit

Permalink
determine hs_active correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
linh2931 committed Dec 31, 2023
1 parent 78ca2b4 commit 33fae7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,10 @@ struct controller_impl {
bool hs_active = false;
if (!b->header_extensions.empty()) {
std::optional<block_header_extension> ext = b->extract_header_extension(instant_finality_extension::extension_id());
hs_active = !!ext;
if (ext) {
const auto& if_extension = std::get<instant_finality_extension>(*ext);
hs_active = !!if_extension.new_proposer_policy;
}
}

auto trx_mroot = calculate_trx_merkle( b->transactions, hs_active );
Expand Down

0 comments on commit 33fae7d

Please sign in to comment.