This pull adds support to the python testing framework for the new p2p messages introduced in BIP 152, and adds a new test p2p-compactblocks.py
.
In order to test compact blocks effectively, I needed a way to disable regtest’s BIP9 parameters for segwit, as compact block behavior is affected by whether segwit activation is permitted or not. So one of the commits here adds support for a new command line argument to bitcoind, -bip9params
, which allows specifying a “deployment:starttime:timeout” that will override the hardcoded values (only allowed in regtest mode).
In the new p2p-compactblocks.py
test, I also included two tests that exercise #8408. However, I’m not sure whether we’ll want to include this PR on the 0.13 branch, so I’ve just cherry-picked the two commits from #8408 over to this PR for now, so that the tests will pass.
Thanks @sipa for the python siphash implementation used in this pull.