aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:07:58 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-25 22:07:58 +0000
commit81cb0fcdccf08afd6f37d21ccfefb31131fd3950 (patch)
tree8e706285c9ab229c428a1ef231898026aab23743 /tests
parentblockchain: add missing m_tx_pool.on_blockchain_dec (diff)
downloadmonero-81cb0fcdccf08afd6f37d21ccfefb31131fd3950.tar.xz
blockchain: fix bitflipping test with quantized block rewards
Block reward may now be less than the full amount allowed. This was breaking the bitflipping test. We now keep track of whether a block which was accepted by the core has a lower than allowed block reward, and allow this in the test.
Diffstat (limited to 'tests')
-rw-r--r--tests/core_tests/block_validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/core_tests/block_validation.cpp b/tests/core_tests/block_validation.cpp
index 440e46647..e4242f8fe 100644
--- a/tests/core_tests/block_validation.cpp
+++ b/tests/core_tests/block_validation.cpp
@@ -618,7 +618,8 @@ bool gen_block_invalid_binary_format::check_block_verification_context(const cry
}
else
{
- return !bvc.m_added_to_main_chain && (bvc.m_already_exists || bvc.m_marked_as_orphaned || bvc.m_verifivation_failed);
+ return (!bvc.m_added_to_main_chain && (bvc.m_already_exists || bvc.m_marked_as_orphaned || bvc.m_verifivation_failed))
+ || (bvc.m_added_to_main_chain && bvc.m_partial_block_reward);
}
}