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:
Vasil Dimov 2021-06-11 13:50:58 +02:00
parent ba45f02708
commit 86742811ce
No known key found for this signature in database
GPG Key ID: 54DF06F64B55CBBF

View File

@ -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