From 2e37a5e9694b5b05cfb1888829f85dc4c9582f22 Mon Sep 17 00:00:00 2001 From: Guilherme Lawless Date: Wed, 6 May 2020 21:14:42 +0100 Subject: [PATCH] Fix intermittent failure in test wallet.work_cache_delayed (#2760) By random chance, the pre-set work could pass even for the blocks it's not intended for (due to test difficulty being low). The two removed lines are, in the end, out of scope for this test. --- nano/core_test/wallet.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/nano/core_test/wallet.cpp b/nano/core_test/wallet.cpp index acf755c30..2827898e8 100644 --- a/nano/core_test/wallet.cpp +++ b/nano/core_test/wallet.cpp @@ -713,8 +713,6 @@ TEST (wallet, work_cache_delayed) ASSERT_NO_ERROR (system.poll ()); if (!wallet->store.work_get (node1.wallets.tx_begin_read (), account1, work1)) { - ASSERT_LT (nano::work_difficulty (nano::work_version::work_1, nano::test_genesis_key.pub, work1), threshold); - ASSERT_LT (nano::work_difficulty (nano::work_version::work_1, block1->hash (), work1), threshold); again = nano::work_difficulty (nano::work_version::work_1, block2->hash (), work1) < threshold; } }