Skip to content
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

Fix: ledger bootstrap_weights size is reported as 0 #3978

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nano/secure/ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ nano::uncemented_info::uncemented_info (nano::block_hash const & cemented_fronti

std::unique_ptr<nano::container_info_component> nano::collect_container_info (ledger & ledger, std::string const & name)
{
auto count = ledger.bootstrap_weights_size.load ();
auto count = ledger.bootstrap_weights.size ();
auto sizeof_element = sizeof (decltype (ledger.bootstrap_weights)::value_type);
auto composite = std::make_unique<container_info_composite> (name);
composite->add_component (std::make_unique<container_info_leaf> (container_info{ "bootstrap_weights", count, sizeof_element }));
Expand Down
1 change: 0 additions & 1 deletion nano/secure/ledger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ledger final
nano::ledger_cache cache;
nano::stat & stats;
std::unordered_map<nano::account, nano::uint128_t> bootstrap_weights;
std::atomic<size_t> bootstrap_weights_size{ 0 };
uint64_t bootstrap_weight_max_blocks{ 1 };
std::atomic<bool> check_bootstrap_weights;
bool pruning{ false };
Expand Down