update to py3 env path
This commit is contained in:
parent
04d218f49d
commit
f4dcf02062
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||||
|
@ -96,6 +96,12 @@ class TestNode(NodeConnCB):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise AssertionError("Got pong for unknown ping [%s]" % repr(message))
|
raise AssertionError("Got pong for unknown ping [%s]" % repr(message))
|
||||||
|
|
||||||
|
def on_reject(self, conn, message):
|
||||||
|
if message.message == b'tx':
|
||||||
|
self.tx_reject_map[message.data] = RejectResult(message.code, message.reason)
|
||||||
|
if message.message == b'block':
|
||||||
|
self.block_reject_map[message.data] = RejectResult(message.code, message.reason)
|
||||||
|
|
||||||
def send_inv(self, obj):
|
def send_inv(self, obj):
|
||||||
mtype = 2 if isinstance(obj, CBlock) else 1
|
mtype = 2 if isinstance(obj, CBlock) else 1
|
||||||
self.conn.send_message(msg_inv([CInv(mtype, obj.sha256)]))
|
self.conn.send_message(msg_inv([CInv(mtype, obj.sha256)]))
|
||||||
|
@ -174,7 +180,7 @@ class TestManager():
|
||||||
def wait_for_verack(self):
|
def wait_for_verack(self):
|
||||||
def veracked():
|
def veracked():
|
||||||
return all(node.verack_received for node in self.test_nodes)
|
return all(node.verack_received for node in self.test_nodes)
|
||||||
#return wait_until(veracked, timeout=10)
|
return wait_until(veracked, timeout=10)
|
||||||
|
|
||||||
def wait_for_pings(self, counter):
|
def wait_for_pings(self, counter):
|
||||||
def received_pongs():
|
def received_pongs():
|
||||||
|
|
Loading…
Reference in New Issue