aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_leak_tx.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-04-25 13:44:44 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-05-07 14:34:55 +0200
commiteeaaa58d2ccc243a7506d34bca47c678867d6dd5 (patch)
tree674f8d72a49729f20138ef0acf81403277f37389 /test/functional/p2p_leak_tx.py
parentc1cd2b5a97f435b75f860a1a4d95e15a2c3b270b (diff)
downloadbitcoin-eeaaa58d2ccc243a7506d34bca47c678867d6dd5.tar.xz
test: replace inv type magic numbers by constants
Diffstat (limited to 'test/functional/p2p_leak_tx.py')
-rwxr-xr-xtest/functional/p2p_leak_tx.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/p2p_leak_tx.py b/test/functional/p2p_leak_tx.py
index 6b3436fa5f..da30ad5977 100755
--- a/test/functional/p2p_leak_tx.py
+++ b/test/functional/p2p_leak_tx.py
@@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that we don't leak txs to inbound peers that we haven't yet announced to"""
-from test_framework.messages import msg_getdata, CInv
+from test_framework.messages import msg_getdata, CInv, MSG_TX
from test_framework.mininode import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
@@ -37,7 +37,7 @@ class P2PLeakTxTest(BitcoinTestFramework):
txid = gen_node.sendtoaddress(gen_node.getnewaddress(), 0.01)
want_tx = msg_getdata()
- want_tx.inv.append(CInv(t=1, h=int(txid, 16)))
+ want_tx.inv.append(CInv(t=MSG_TX, h=int(txid, 16)))
inbound_peer.last_message.pop('notfound', None)
inbound_peer.send_and_ping(want_tx)