diff options
Diffstat (limited to 'test/functional/p2p_getdata.py')
-rwxr-xr-x | test/functional/p2p_getdata.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/p2p_getdata.py b/test/functional/p2p_getdata.py index fd94a09d80..bbecd2cf81 100755 --- a/test/functional/p2p_getdata.py +++ b/test/functional/p2p_getdata.py @@ -16,8 +16,8 @@ from test_framework.mininode import ( from test_framework.test_framework import BitcoinTestFramework from test_framework.util import wait_until -class P2PStoreBlock(P2PInterface): +class P2PStoreBlock(P2PInterface): def __init__(self): super().__init__() self.blocks = defaultdict(int) @@ -26,6 +26,7 @@ class P2PStoreBlock(P2PInterface): message.block.calc_sha256() self.blocks[message.block.sha256] += 1 + class GetdataTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 @@ -47,5 +48,6 @@ class GetdataTest(BitcoinTestFramework): self.nodes[0].p2ps[0].send_and_ping(good_getdata) wait_until(lambda: self.nodes[0].p2ps[0].blocks[best_block] == 1, timeout=30, lock=mininode_lock) + if __name__ == '__main__': GetdataTest().main() |