Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_unbroadcast.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2020 The Bitcoin Core developers | # Copyright (c) 2017-2020 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 the mempool ensures transaction delivery by periodically sending | """Test that the mempool ensures transaction delivery by periodically sending | ||||
to peers until a GETDATA is received.""" | to peers until a GETDATA is received.""" | ||||
import time | import time | ||||
from test_framework.blocktools import create_confirmed_utxos | from test_framework.blocktools import create_confirmed_utxos | ||||
from test_framework.p2p import P2PTxInvStore | from test_framework.p2p import P2PTxInvStore | ||||
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, connect_nodes, disconnect_nodes | ||||
assert_equal, | |||||
connect_nodes, | |||||
disconnect_nodes, | |||||
) | |||||
# 15 minutes in seconds | # 15 minutes in seconds | ||||
MAX_INITIAL_BROADCAST_DELAY = 15 * 60 | MAX_INITIAL_BROADCAST_DELAY = 15 * 60 | ||||
class MempoolUnbroadcastTest(BitcoinTestFramework): | class MempoolUnbroadcastTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |