aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-10-29 11:39:06 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-10-29 11:40:15 +0100
commit6196cf77e57499c678df275c2707bda37873868e (patch)
tree1730e2e2bcd76793bf4dd5398a3a035718744a3f /test/functional
parent3f512f3d563954547061ee743648b57a900cbe04 (diff)
parentd419fdedbe34c7ea19c0473660cc1b486b4e70d8 (diff)
Merge #19753: p2p: don't add AlreadyHave transactions to recentRejects
d419fdedbe34c7ea19c0473660cc1b486b4e70d8 [net processing] Don't add AlreadyHave txs to recentRejects (Troy Giorshev) Pull request description: If we already have a transaction, don't add it to recentRejects Now, we only add a transaction to our recentRejects filter if we didn't already have it, meaning that it is added at most once, as intended. ACKs for top commit: jnewbery: Code review ACK d419fdedbe34c7ea19c0473660cc1b486b4e70d8 laanwj: Code review ACK d419fdedbe34c7ea19c0473660cc1b486b4e70d8 Tree-SHA512: cff5c1ba36c4700e2d6ab3eec4a3e51e1bef28fb3cc1bc850c84e06d6e5a9f6c32825207c253cc9cdf596b2eaadb6b5be68b3f8ca752b4ef6c31cf85138e3c99
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/p2p_permissions.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py
index 653e3894af..ed82e6a2e2 100755
--- a/test/functional/p2p_permissions.py
+++ b/test/functional/p2p_permissions.py
@@ -153,11 +153,20 @@ class P2PPermissionsTests(BitcoinTestFramework):
self.log.debug("Check that node[1] will not send an invalid tx to node[0]")
tx.vout[0].nValue += 1
txid = tx.rehash()
+ # Send the transaction twice. The first time, it'll be rejected by ATMP because it conflicts
+ # with a mempool transaction. The second time, it'll be in the recentRejects filter.
p2p_rebroadcast_wallet.send_txs_and_test(
[tx],
self.nodes[1],
success=False,
- reject_reason='Not relaying non-mempool transaction {} from forcerelay peer=0'.format(txid),
+ reject_reason='{} from peer=0 was not accepted: txn-mempool-conflict'.format(txid)
+ )
+
+ p2p_rebroadcast_wallet.send_txs_and_test(
+ [tx],
+ self.nodes[1],
+ success=False,
+ reject_reason='Not relaying non-mempool transaction {} from forcerelay peer=0'.format(txid)
)
def checkpermission(self, args, expectedPermissions, whitelisted):