mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 18:09:47 +01:00
test: use NODE_* constants instead of magic numbers
We just assigned `NODE_NETWORK | NODE_WITNESS` to `nServices` a few lines above. Use that for verifying correctness instead of `9`.
This commit is contained in:
parent
ba45f02708
commit
86742811ce
@ -36,7 +36,7 @@ class AddrReceiver(P2PInterface):
|
||||
|
||||
def on_addrv2(self, message):
|
||||
for addr in message.addrs:
|
||||
assert_equal(addr.nServices, 9)
|
||||
assert_equal(addr.nServices, NODE_NETWORK | NODE_WITNESS)
|
||||
assert addr.ip.startswith('123.123.123.')
|
||||
assert (8333 <= addr.port < 8343)
|
||||
self.addrv2_received_and_checked = True
|
||||
|
Loading…
Reference in New Issue
Block a user