diff --git a/nano/core_test/active_transactions.cpp b/nano/core_test/active_transactions.cpp index 0075853129..77bc416e15 100644 --- a/nano/core_test/active_transactions.cpp +++ b/nano/core_test/active_transactions.cpp @@ -499,8 +499,15 @@ TEST (active_transactions, inactive_votes_cache_multiple_votes) auto vote2 (std::make_shared (nano::test_genesis_key.pub, nano::test_genesis_key.prv, 0, std::vector (1, send1->hash ()))); system.nodes[0]->vote_processor.vote (vote2, std::make_shared (system.nodes[0]->network.udp_channels, system.nodes[0]->network.endpoint (), system.nodes[0]->network_params.protocol.protocol_version)); system.deadline_set (5s); - while (system.nodes[0]->active.find_inactive_votes_cache (send1->hash ()).voters.size () != 2) + while (true) { + { + nano::lock_guard active_guard (system.nodes[0]->active.mutex); + if (system.nodes[0]->active.find_inactive_votes_cache (send1->hash ()).voters.size () == 2) + { + break; + } + } ASSERT_NO_ERROR (system.poll ()); } ASSERT_EQ (1, system.nodes[0]->active.inactive_votes_cache_size ()); diff --git a/nano/node/active_transactions.cpp b/nano/node/active_transactions.cpp index e77f31f662..b9647afd59 100644 --- a/nano/node/active_transactions.cpp +++ b/nano/node/active_transactions.cpp @@ -333,7 +333,8 @@ void nano::active_transactions::request_confirm (nano::unique_lock & // Batched confirmation requests if (!batched_confirm_req_bundle_l.empty ()) { - node.network.broadcast_confirm_req_batched_many (batched_confirm_req_bundle_l, [this]() { + node.network.broadcast_confirm_req_batched_many ( + batched_confirm_req_bundle_l, [this]() { { nano::lock_guard guard_l (this->mutex); --this->ongoing_broadcasts; diff --git a/nano/secure/versioning.cpp b/nano/secure/versioning.cpp index c05bdfd323..0ed201d8ed 100644 --- a/nano/secure/versioning.cpp +++ b/nano/secure/versioning.cpp @@ -1,9 +1,9 @@ #include -#include - #include +#include + nano::account_info_v1::account_info_v1 (MDB_val const & val_a) { assert (val_a.mv_size == sizeof (*this));