ASAN error in vote_by_hash test (#2356)
This commit is contained in:
parent
5585d352a2
commit
f0d010db88
1 changed files with 2 additions and 1 deletions
|
@ -2486,12 +2486,13 @@ TEST (node, vote_republish)
|
|||
|
||||
TEST (node, vote_by_hash_bundle)
|
||||
{
|
||||
// Keep max_hashes above system to ensure it is kept in scope as votes can be added during system destruction
|
||||
std::atomic<size_t> max_hashes{ 0 };
|
||||
nano::system system (24000, 1);
|
||||
system.wallet (0)->insert_adhoc (nano::test_genesis_key.prv);
|
||||
nano::keypair key1;
|
||||
system.wallet (0)->insert_adhoc (key1.prv);
|
||||
|
||||
std::atomic<size_t> max_hashes{ 0 };
|
||||
system.nodes[0]->observers.vote.add ([&max_hashes](std::shared_ptr<nano::vote> vote_a, std::shared_ptr<nano::transport::channel> channel_a) {
|
||||
if (vote_a->blocks.size () > max_hashes)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue