mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 16:32:47 +00:00
test: Remove unused wait_for_addr, firstAddrnServices, on_addr
Unused after commit be25ac3092b7755e26e1ec6c33a27cd0e3dd9eac
This commit is contained in:
parent
fa388a3585
commit
fa7bac94d8
@ -28,15 +28,9 @@ from test_framework.util import (
|
||||
NODE_NETWORK_LIMITED_MIN_BLOCKS = 288
|
||||
|
||||
class P2PIgnoreInv(P2PInterface):
|
||||
firstAddrnServices = 0
|
||||
def on_inv(self, message):
|
||||
# The node will send us invs for other blocks. Ignore them.
|
||||
pass
|
||||
def on_addr(self, message):
|
||||
self.firstAddrnServices = message.addrs[0].nServices
|
||||
def wait_for_addr(self, timeout=5):
|
||||
test_function = lambda: self.last_message.get("addr")
|
||||
self.wait_until(test_function, timeout=timeout)
|
||||
def send_getdata_for_block(self, blockhash):
|
||||
getdata_request = msg_getdata()
|
||||
getdata_request.inv.append(CInv(MSG_BLOCK, int(blockhash, 16)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user