Skip to content

Commit

Permalink
test: use NODE_* constants instead of magic numbers
Browse files Browse the repository at this point in the history
We just assigned `NODE_NETWORK | NODE_WITNESS` to `nServices` a few
lines above. Use that for verifying correctness instead of `9`.
  • Loading branch information
vasild committed Jun 11, 2021
1 parent ba45f02 commit 8674281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/p2p_addrv2_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self):

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
Expand Down

0 comments on commit 8674281

Please sign in to comment.