Skip to content

Commit

Permalink
Fix intermittent failure in test wallet.work_cache_delayed (#2760)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
guilhermelawless authored May 6, 2020
1 parent f4b47d4 commit 2e37a5e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nano/core_test/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2e37a5e

Please sign in to comment.