Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_getdata.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2020 The Bitcoin Core developers | # Copyright (c) 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 GETDATA processing behavior""" | """Test GETDATA processing behavior""" | ||||
from collections import defaultdict | from collections import defaultdict | ||||
from test_framework.messages import ( | from test_framework.messages import CInv, msg_getdata | ||||
CInv, | |||||
msg_getdata, | |||||
) | |||||
from test_framework.p2p import P2PInterface | from test_framework.p2p import P2PInterface | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
class P2PStoreBlock(P2PInterface): | class P2PStoreBlock(P2PInterface): | ||||
def __init__(self): | def __init__(self): | ||||
super().__init__() | super().__init__() | ||||
self.blocks = defaultdict(int) | self.blocks = defaultdict(int) | ||||
Show All 32 Lines |