-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IF: add latest commit QC known to proposer to block extension (part 1) #2011
Conversation
Note:start |
…for serializing boost::dynamic_bitset
…t from quorum_certificate_extension move constructor
@@ -1,5 +1,6 @@ | |||
#pragma once | |||
#include <fc/variant.hpp> | |||
#include <fc/variant_dynamic_bitset.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This include is needed for code using variant conversion directly, as
.../libraries/libfc/include/fc/variant.hpp:619:7: note: in instantiation of function template specialization 'fc::to_variant<eosio::chain::quorum_certificate_extension>' requested here
619 | to_variant( val, *this );
| ^
.../libraries/libfc/include/fc/variant_object.hpp:188:30: note: in instantiation of function template specialization 'fc::variant::variant<eosio::chain::quorum_certificate_extension>' requested here
188 | set(std::move(key), variant( fc::forward<T>(var) ) );
| ^
.../libraries/chain/include/eosio/chain/abi_serializer.hpp:697:16: note: in instantiation of function template specialization 'fc::mutable_variant_object::operator()<const eosio::chain::quorum_certificate_extension &>' requested here
697 | mvo("qc_extension", qc_extension);
| ^
.../libraries/chain/include/eosio/chain/abi_serializer.hpp:980:26: note: in instantiation of function template specialization 'eosio::chain::impl::abi_to_variant::add<eosio::chain::abi_resolver>' requested here
980 | impl::abi_to_variant::add(mvo, "_", o, resolver, ctx);
| ^
.../plugins/chain_plugin/chain_plugin.cpp:1974:20: note: in instantiation of function template specialization 'eosio::chain::abi_serializer::to_variant<eosio::chain::signed_block, eosio::chain::abi_resolver>' requested here
1974 | abi_serializer::to_variant( *block, pretty_output, resolver, abi_serializer_max_time );
| ^
1 warning and 1 error generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abi_serializer should include the header then not variant_object.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abi_serializer.hpp
currently includes variant_object.hpp
, not variant.hpp
. As variant.hpp
and variant_dynamic_bitset.hpp
are similar and should be treated in the same way, that's why I placed it in variant_object.hpp
as it already includes variant.hpp
. I can move it to abi_serilizer if it is more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further thought, I agree with your suggestion, as it will limit the occurrences where variant_dynamic_bitset.hpp
is included. Thanks.
This is the first part of adding QC to block extension, implementing the definition and serialization. The remaining work is the insert of QC, which will be done after new
block_header_state
is finished (#1941).Partly resolved #1586