mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue