aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_permissions.py
diff options
context:
space:
mode:
authorTroy Giorshev <troygiorshev@gmail.com>2020-08-12 11:04:29 -0400
committerTroy Giorshev <troygiorshev@gmail.com>2020-10-27 06:07:41 -0400
commitd419fdedbe34c7ea19c0473660cc1b486b4e70d8 (patch)
tree18fe9004205217b5abb80415631e639aff3eace6 /test/functional/p2p_permissions.py
parent55b1ffcd259cc64139dad646a52fab5c597c95c2 (diff)
downloadbitcoin-d419fdedbe34c7ea19c0473660cc1b486b4e70d8.tar.xz
[net processing] Don't add AlreadyHave txs 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.
Diffstat (limited to 'test/functional/p2p_permissions.py')
-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):