Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-get-invalid-block.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2019 The Bitcoin developers | # Copyright (c) 2019 The Bitcoin 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 requesting invalid blocks behaves safely.""" | """Test requesting invalid blocks behaves safely.""" | ||||
from test_framework.messages import ( | from test_framework.messages import ( | ||||
MSG_BLOCK, | |||||
MSG_CMPCT_BLOCK, | |||||
CInv, | CInv, | ||||
msg_getblocks, | msg_getblocks, | ||||
msg_getdata, | msg_getdata, | ||||
msg_getheaders, | msg_getheaders, | ||||
MSG_BLOCK, | |||||
MSG_CMPCT_BLOCK, | |||||
) | ) | ||||
from test_framework.p2p import p2p_lock, P2PInterface | from test_framework.p2p import P2PInterface, p2p_lock | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class GetInvalidBlockTest(BitcoinTestFramework): | class GetInvalidBlockTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |