[Bitcoin-development] Controlled block generation in fuzzer for testing blockchain

Amir Taaki zgenjix at yahoo.com
Sun Jan 29 14:36:55 UTC 2012


I added the ability to do controlled generation of blocks to gavin's fuzzer

https://github.com/genjix/bitcoin/tree/fuzzer


bitcoind -daemon
bitcoind setfuzzpreviousblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
bitcoind setgenerate true

It will start hashing the block with the previous hash field set to 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f and the target as 0x1d0000ff

On completion it will dump the hex value of the block to debug.log and exit.

You can then feed that block to your implementation in whatever controlled manner you wish (i.e with libbitcoin I made a simple tool in a few lines to read the hex and send it via the network in localhost). If anyone wants the libbitcoin tool then let me know and i'll paste it over on IRC.




More information about the bitcoin-dev mailing list