From d174a5828f3ee91c19fca6f409589116bcac001c Mon Sep 17 00:00:00 2001 From: clemahieu Date: Sun, 22 Dec 2019 12:28:06 -0300 Subject: [PATCH] Directly inserting hashes to test vote bundling instead of creating full blocks. This reduced the possibility of testingn race conditions. --- nano/core_test/node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index 4d156d4d..7bd7e6cf 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -2556,8 +2556,8 @@ TEST (node, vote_by_hash_bundle) nano::genesis genesis; for (int i = 1; i <= 200; i++) { - auto send (std::make_shared (genesis.hash (), key1.pub, std::numeric_limits::max () - (system.nodes[0]->config.receive_minimum.number () * i), nano::test_genesis_key.prv, nano::test_genesis_key.pub, *system.work.generate (genesis.hash ()))); - system.nodes[0]->block_confirm (send); + nano::block_hash hash (i); + system.nodes [0]->block_processor.generator.add (hash); } // Verify that bundling occurs. While reaching 12 should be common on most hardware in release mode,