Skip to content

Commit 72bd4ab

Browse files
committed
Merge #15193: Default -whitelistforcerelay to off
a36d97d Default -whitelistforcerelay to off (Suhas Daftuar) Pull request description: No one seems to use this "feature", and at any rate the behavior of relaying transactions when they violate local policy is error-prone, if we ever consider changing the ban behavior of our software from one version to the next. Defaulting this to off means that users who use -whitelist won't be unexpectedly surprised by this interaction. If anyone is still relying on this feature, it can still be explicitly turned on. Tree-SHA512: 52650ad464a728d1648f496751e3f713077ea3a1de7278ed03531b2e8723e63cf2f6f41b56c98c0f73ffa22c36e01d9170b409ab452c737aca35b7ecd7a6b448
2 parents 5eb32d2 + a36d97d commit 72bd4ab

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

doc/release-notes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ Configuration option changes
111111
ambiguous whether the hash character is meant for the password or as a
112112
comment.
113113

114+
- The `whitelistforcerelay` option is used to relay transactions from
115+
whitelisted peers even when not accepted to the mempool. This option now
116+
defaults to being off, so that changes in policy and disconnect/ban behavior
117+
will not cause a node that is whitelisting another to be dropped by peers.
118+
Users can still explicitly enable this behavior with the command line option
119+
(and may want to consider letting the Bitcoin Core project know about their
120+
use-case, as this feature could be deprecated in the future).
121+
114122
Documentation
115123
-------------
116124

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct LockPoints;
5050
/** Default for -whitelistrelay. */
5151
static const bool DEFAULT_WHITELISTRELAY = true;
5252
/** Default for -whitelistforcerelay. */
53-
static const bool DEFAULT_WHITELISTFORCERELAY = true;
53+
static const bool DEFAULT_WHITELISTFORCERELAY = false;
5454
/** Default for -minrelaytxfee, minimum relay fee for transactions */
5555
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
5656
//! -maxtxfee default

test/functional/p2p_segwit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ def test_p2sh_witness(self):
755755
spend_tx.vin[0].scriptSig = CScript([p2wsh_pubkey, b'a'])
756756
spend_tx.rehash()
757757
with self.nodes[0].assert_debug_log(
758-
expected_msgs=('Not relaying invalid transaction {}'.format(spend_tx.hash), 'was not accepted: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)')):
758+
expected_msgs=(spend_tx.hash, 'was not accepted: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)')):
759759
test_transaction_acceptance(self.nodes[0], self.test_node, spend_tx, with_witness=False, accepted=False)
760760

761761
# Now put the witness script in the witness, should succeed after

0 commit comments

Comments
 (0)