Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_leak_tx.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2018 The Bitcoin Core developers | # Copyright (c) 2017-2018 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # 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""" | """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, MSG_TX | from test_framework.messages import MSG_TX, CInv, msg_getdata | ||||
from test_framework.p2p import P2PDataStore | from test_framework.p2p import P2PDataStore | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import ( | from test_framework.util import assert_equal | ||||
assert_equal, | |||||
) | |||||
class P2PNode(P2PDataStore): | class P2PNode(P2PDataStore): | ||||
def on_inv(self, msg): | def on_inv(self, msg): | ||||
pass | pass | ||||
class P2PLeakTxTest(BitcoinTestFramework): | class P2PLeakTxTest(BitcoinTestFramework): | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |