Prevent arbitrary files from being overwritten. There have been reports
that users have overwritten wallet files this way. It may also avoid
other security issues.
Fixes#9934. Adds mention to release notes and adds a test.
Github-Pull: #9937
Rebased-From: 0cd9273fd9
Writes the GUI settings to `guisettings.bak` in the data directory
before wiping them. This can be used to retroactively troubleshoot
issues (e.g. #11262) where `-resetguisettings` solves the problem.
Github-Pull: #11338
Rebased-From: 723aa1b875
Replace witness-stripped wallet transactions with full transactions;
this can happen when upgrading from a pre-segwit wallet to a segwit-
aware wallet.
Github-Pull: #11225
Rebased-From: d01a9682b1
The LevelDB docs seem to indicate that an iterator will not take
snapshots (even providing instructions on how to do so yourself).
In several of the places we use them, we assume snapshots to have
been taken.
In order to make sure LevelDB doesn't change out from under us
(and to prevent the next person who reads the docs from having the
same fright I did), verify that snapshots are taken in our tests.
Github-Pull: #11422
Rebased-From: bb8376bbc3
Changing __init__() -> set_test_params() in the tests should not have
applied to NodeConnCB-derived objects.
Github-Pull: #11319
Rebased-From: f97ab35fa9
assumevalid.py would try to send over a closed P2P connection in a loop,
hitting the following failure many times:
TestFramework.mininode (ERROR): Cannot send message. No connection to node!
The test still passes, but this is a lot of noise in the test log.
Just check that the connection is open before trying to send.
Github-Pull: #11345
Rebased-From: e9e9391083
In an abundance of caution this restores "Bitcoin Developers" to the COPYING file in
case there were contributors before that point in time that would object to the
current label. It's harmless and more pedantically correct.
[Change extracted from the Bitcoin-abc repository, commit message by gmaxwell]
Signed-off-by: Gregory Maxwell <greg@xiph.org>
Github-Pull: #11318
Rebased-From: d552ed678c
Removes the extraneous custom fee radio group and its single radio
button. The radio button is replaced with a label that has the
radio button's text.
Github-Pull: #11334
Rebased-From: e53fa4a1ca
The first argument of estimatesmartfee was renamed from nblocks to
conf_target in 06bcdb8da6. Update the
client-side table as well.
Github-Pull: #11267
Rebased-From: 24697c40ee
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