mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
Unit test doublespends in new blocks
As suggested by Greg Maxwell-- unit test to make sure a block with a double-spend in it doesn't pass validation if half of the double-spend is already in the memory pool (so full-blown transaction validation is skipped) when the block is received.
This commit is contained in:
committed by
Pieter Wuille
parent
17b11428c1
commit
517e6dd256
@@ -18,4 +18,16 @@ uint256_tests.cpp.
|
||||
|
||||
For further reading, I found the following website to be helpful in
|
||||
explaining how the boost unit test framework works:
|
||||
[http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/).
|
||||
[http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/).
|
||||
|
||||
test_bitcoin has some built-in command-line arguments; for
|
||||
example, to run just the getarg_tests verbosely:
|
||||
|
||||
test_bitcoin --log_level=all --run_test=getarg_tests
|
||||
|
||||
... or to run just the doubledash test:
|
||||
|
||||
test_bitcoin --run_test=getarg_tests/doubledash
|
||||
|
||||
Run test_bitcoin --help for the full list.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user