aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-23 09:42:21 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-23 09:40:49 -0400
commitfab47375fe0bdec1e557e087fdb0707c4dfa7cc2 (patch)
tree378f8723e805e1539365281697e5f6431d8f1cbc
parent793e0ff22cbace2a0fbe1e4a2e88a7bc6bf44502 (diff)
test: pep-8 p2p_getdata.py
-rwxr-xr-xtest/functional/p2p_getdata.py4
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()