mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
[test] Remove GetAddrStore class
This commit is contained in:
parent
ef2f149bf2
commit
1d8193e2a2
@ -47,21 +47,6 @@ class AddrReceiver(P2PInterface):
|
|||||||
return self.message_count['getaddr'] > 0
|
return self.message_count['getaddr'] > 0
|
||||||
|
|
||||||
|
|
||||||
class GetAddrStore(P2PInterface):
|
|
||||||
getaddr_received = False
|
|
||||||
num_ipv4_received = 0
|
|
||||||
|
|
||||||
def on_getaddr(self, message):
|
|
||||||
self.getaddr_received = True
|
|
||||||
|
|
||||||
def on_addr(self, message):
|
|
||||||
for addr in message.addrs:
|
|
||||||
self.num_ipv4_received += 1
|
|
||||||
|
|
||||||
def addr_received(self):
|
|
||||||
return self.num_ipv4_received != 0
|
|
||||||
|
|
||||||
|
|
||||||
class AddrTest(BitcoinTestFramework):
|
class AddrTest(BitcoinTestFramework):
|
||||||
counter = 0
|
counter = 0
|
||||||
mocktime = int(time.time())
|
mocktime = int(time.time())
|
||||||
|
Loading…
Reference in New Issue
Block a user