Re: [Bitcoin-development] Question on creating test cases for block.CheckBlock()

2014-07-22 Thread Mike Hearn
There is no infrastructure for writing block chain unit tests unfortunately. Last time I tried to fix this I ended up going down a rabbit hole - Bitcoin wasn't written to be a testable codebase and as a result reinitialising it from scratch is rather difficult (there are lots of global variables

[Bitcoin-development] Question on creating test cases for block.CheckBlock()

2014-07-21 Thread Sergio Lerner
I'm working on a BIP which needs to modify the block acceptance rules. I have two ways of testing: - Mining blocks on the testnet - Creating test cases for Bitcoin Core. I want to create those test cases for block.CheckBlock(), which involves verifying 100 dynamically generated blocks. What is