This patch improves branch coverage of the test, making sure a
message can not be verified with the wrong address or signature.
Github-Pull: #11241
Rebased-From: b3d6fc6547
Almost all test scripts currently need to override the __init__()
method. When they do that they need to call into super().__init__() as
the base class does some generic initialization.
This commit makes the base class __init__() call into set_test_params()
method. Individual test cases can override set_test_params() to setup
their test parameters.
Github-Pull: #11121
Rebased-From: 5448a1471d
Separates the act of creating a TestNode object from starting the node.
The test_framework now keeps track of its list of TestNodes, and test
writers can call start_node() and stop_node() without having to update
the self.nodes list.
Github-Pull: #11121
Rebased-From: 36b6268670
CWallet::MarkConflicted may acquire the cs_main lock after
CWalletDB::LoadWallet acquires the cs_wallet lock during wallet initialization.
(CWalletDB::LoadWallet calls ReadKeyValue which calls CWallet::LoadToWallet
which calls CWallet::MarkConflicted). This is the opposite order that cs_main
and cs_wallet locks are acquired in the rest of the code, and so leads to
POTENTIAL DEADLOCK DETECTED errors if bitcoin is built with -DDEBUG_LOCKORDER.
This commit changes CWallet::LoadWallet (which calls CWalletDB::LoadWallet) to
acquire both locks in the standard order. It also fixes some tests that were
acquiring wallet and main locks out of order and failed with the new locking in
CWallet::LoadWallet.
Error was reported by Luke Dashjr <luke-jr@utopios.org> in
https://botbot.me/freenode/bitcoin-core-dev/msg/90244330/
Github-Pull: #11126
Rebased-From: de9a1db2ed
Use POSIX rename atomicity at the `bitcoind` side to create a working
cookie atomically:
- Write `.cookie.tmp`, close file
- Rename `.cookie.tmp` to `.cookie`
This avoids clients reading invalid/partial cookies as in #11129.
Github-Pull: #11131
Rebased-From: 82dd7195e1
Fixes a couple of bugs from the introduction of TestNode:
- test scripts were no longer able to specify a custom timeout for
starting a node. Therefore tests with nodes that take a long time to
start up (eg pruning.py) would fail.
- the test for whether a node has failed on start up was broken
by changing 'assert x is None' to 'assert not x'. Since
subprocess.poll() can return None (indicating the node is still running)
or 0 (indicating the node exited with return code 0), this was a
regression.
Github-Pull: #11077
Rebased-From: 2b4ea520b7
When running the tests locally with a parallelism of 4 on an otherwise
busy system, RPC can take quite a wait to come up.
Change the timeout to 60 seconds just to be safe.
Github-Pull: #11091
Rebased-From: c1470a058f
TestNode is a class responsible for all state related to a bitcoind node
under test. It stores local state, is responsible for tracking the
bitcoind process and delegates unrecognised messages to the RPC
connection.
This commit changes start_nodes and stop_nodes to start and stop the
bitcoind nodes in parallel, making test setup and teardown much faster.
Github-Pull: #10711
Rebased-From: 7897338918
A button was removed, so now button(1) is nullptr
Github-Pull: #11332
Rebased-From: cdaf3a1f9e
Tree-SHA512: 0a49bf4e9ab08e5869170c8a212da60c9a6b90c36427d788de384aa4be6d87bb5e00a21edf78eed34f81bbc554b6f15565bb9b493dafcbfe9d6f4664d7424d9d
Prepare for 0.15.1
Tree-SHA512: d306369ebf2090dd3f74ead6ca6b9f3f2d56bcde6eb6aaab22ac38a5f7ab6cdf3da1142ad6fe266f793f27bbed4247397375f6177f2c7ccc1a57de9acaa5a181
fa120bd01 doc: Old fee_estimates.dat are discarded by 0.15.0 (MarcoFalke)
Pull request description:
Tree-SHA512: b4b1cb3efa307a7a0c37b8cc0a35f8fd31c8268747be59efba6530c36ba6423d9fb37e752782c7ebd5bc22a4aa1d2730b0e9ab560239fb2874afd42197ed9fd0
Release version strings were broken in Gitian by 7522. This is a minimal fix
suitable for 0.15.
After this, we should fix up version handling for good so that gitian packages
the correct string in the release tarball, so that git is not required to get
the tag name.
Github-Pull: #11097
Rebased-From: 4452829b10
Tree-SHA512: 40071b97b2207b2262aef0b4802cb231ccafbff0ed04b5945a64dceda8bdbb2ea71bf6a546e1d03533612edfdc55dedd413da967cba0b1bbd3f9139ec3572f60
The hex is already returned in TxToUniv, no need to give it out a
second independent time in getrawtransaction itself.
Github-Pull: #11027
Rebased-From: e029c6e709
Tree-SHA512: 4f7892431ddb9b59bcc59756890b97a20d046d1d4898f8a80c564223e1cde1c922da403cea4b8ae79d70741d1a9ff337f077043e5bb538cdc4d34fbe09301240
Unused function. Mostly reverts c25d90f125
c25d90f... was merged as part of PR 11022 but is not required.
Github-Pull: #11044
Rebased-From: 1221f60c94
Tree-SHA512: da229b128bee5f124c009a1a2adfb4fa879366c81789824c426c9ce5209c835888a7e6cfeb1724551320a98cd08406a605372f84487a0d289cd6e02f9ac3ea21