Skip to content

Commit

Permalink
do not create unnecessary new_finalizer_policy and new_proposer_polic…
Browse files Browse the repository at this point in the history
…y in instant_finality_extension_with_empty_values_test
  • Loading branch information
linh2931 committed Jan 3, 2024
1 parent 3e9534a commit ee5c187
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions unittests/block_header_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ BOOST_AUTO_TEST_CASE(instant_finality_extension_with_empty_values_test)
block_header header;
constexpr uint32_t last_qc_block_num {0};
constexpr bool is_last_qc_strong {false};
const std::optional<finalizer_policy> new_finalizer_policy;
const std::optional<proposer_policy> new_proposer_policy;

emplace_extension(
header.header_extensions,
instant_finality_extension::extension_id(),
fc::raw::pack( instant_finality_extension{last_qc_block_num, is_last_qc_strong, new_finalizer_policy, new_proposer_policy} )
fc::raw::pack( instant_finality_extension{last_qc_block_num, is_last_qc_strong, std::optional<finalizer_policy>{}, std::optional<proposer_policy>{}} )
);

std::optional<block_header_extension> ext = header.extract_header_extension(instant_finality_extension::extension_id());
Expand Down

0 comments on commit ee5c187

Please sign in to comment.