Nodes don't consider themselves out of "initial block download" until
their active chain has more work than nMinimumChainWork.
While in initial block download, nodes won't relay blocks to their
peers, so test that this parameter functions as intended by verifying
that block relay only succeeds past a given node once its
nMinimumChainWork has been exceeded.
This reverts commit d64ac3f4aa after further discussion.
Tree-SHA512: db1e4ff5b17bcd6fd000a3d21aa74f6b7e4c194e0663c1896a100612671910a7cdadd896b59642420ea016598895b54a8468914847ebefef105a3c47c311d4b2
Rewrite the BIP66 functional tests to reflect height-based activation,
and move it out of the extended test suite.
Remove the unnecessary bipdersig.py test
After 122786d0e0, BIP65 activates at
a particular height (without regard to version numbers of blocks
below that height). Rewrite the BIP65 functional tests to take
this into account, and add a test case that exercises
OP_CHECKLOCKTIMEVERIFY in a block where the soft-fork is active.
Also moves the bip65 functional test out of the extended test suite.
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the
logic for recovering from a crash during chainstate flush.
dbcrash.py is added to the extended tests, as it may take ~10 minutes to run
Use _Exit() instead of exit() for crash simulation
This eliminates stderr output such as:
terminate called without an active exception
or
Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104.
Eliminating the stderr output on crash simulation allows testing with
test_runner.py, which reports a test as failed if stderr is produced.
The functional tests and util tests both require a config file that is
generated by ./configure. This commit merges those two config
files into a single configuration file that can be shared by both tests.
The config from config.ini is put into a Namespace object to maintain
the interface with bctest.py. A future commit could change this
interface to use a dictionary instead of a namespace.
This commit uses the new skip test funcationality added in
232b6665bc to skip the zmq tests if the
python zmq module is not available or if bitcoind has been built without
zmq support.
This removes the zmq-specific logic from test_runner.py. In general it's
better if test_runner.py has no knowledge of special cases for
individual tests and is a general purpose test runner.
maxblocksinflight tested that a node would not send get_data messages
for more than 16 new blocks at the same time. bitcoin core no longer
responds to block invs with get_data, since it does headers-first
sync'ing. This test was therefore testing nothing and can be removed.
the sendheaders test script tests that bitcoin will not send get_headers
for more than 16 blocks simultaneously.
rpt-tests.py outputs progress information as it runs tests. This commit
adds a --quiet option that suppresses that progress output and only
prints a summary of results (and logs from failed tests).
assumevalid was merged as part of PR 9484, but was not added to the
test_runner, so is not run even as part of the extended tests.
This commit adds assumevalid to the list of tests in test_runner. It
also clarifies the code in assumevalid considerably.