From 87b3bce934d308cfd2846d266084540aa9a0113e Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Fri, 26 Apr 2019 18:58:35 +0300 Subject: [PATCH] [TSAN] prevent warnings for confirmation_height.gap_live test (#1936) --- nano/core_test/network.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nano/core_test/network.cpp b/nano/core_test/network.cpp index b7afaf3f..dcd5aed7 100644 --- a/nano/core_test/network.cpp +++ b/nano/core_test/network.cpp @@ -1649,22 +1649,21 @@ TEST (confirmation_height, gap_live) nano::genesis genesis; auto send1 (std::make_shared (nano::genesis_account, genesis.hash (), nano::genesis_account, nano::genesis_amount - nano::Gxrb_ratio, destination.pub, nano::test_genesis_key.prv, nano::test_genesis_key.pub, 0)); + system.nodes[0]->work_generate_blocking (*send1); auto send2 (std::make_shared (nano::genesis_account, send1->hash (), nano::genesis_account, nano::genesis_amount - 2 * nano::Gxrb_ratio, destination.pub, nano::test_genesis_key.prv, nano::test_genesis_key.pub, 0)); + system.nodes[0]->work_generate_blocking (*send2); auto send3 (std::make_shared (nano::genesis_account, send2->hash (), nano::genesis_account, nano::genesis_amount - 3 * nano::Gxrb_ratio, destination.pub, nano::test_genesis_key.prv, nano::test_genesis_key.pub, 0)); + system.nodes[0]->work_generate_blocking (*send3); auto open1 (std::make_shared (send1->hash (), destination.pub, destination.pub, destination.prv, destination.pub, 0)); + system.nodes[0]->work_generate_blocking (*open1); auto receive1 (std::make_shared (open1->hash (), send2->hash (), destination.prv, destination.pub, 0)); + system.nodes[0]->work_generate_blocking (*receive1); auto receive2 (std::make_shared (receive1->hash (), send3->hash (), destination.prv, destination.pub, 0)); + system.nodes[0]->work_generate_blocking (*receive2); for (auto & node : system.nodes) { - node->work_generate_blocking (*send1); - node->work_generate_blocking (*send2); - node->work_generate_blocking (*send3); - node->work_generate_blocking (*open1); - node->work_generate_blocking (*receive1); - node->work_generate_blocking (*receive2); - node->block_processor.add (send1); node->block_processor.add (send2); node->block_processor.add (send3);