aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-06-11 13:50:58 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-06-11 13:52:42 +0200
commit86742811ce3662789ac85334008090a3b54babe3 (patch)
treeb3dcaba72d516634e5b06328d1664b788bd7bcee
parentba45f0270815d54ae3290efc16324c2ff1984565 (diff)
downloadbitcoin-86742811ce3662789ac85334008090a3b54babe3.tar.xz
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`.
-rwxr-xr-xtest/functional/p2p_addrv2_relay.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/p2p_addrv2_relay.py b/test/functional/p2p_addrv2_relay.py
index 23ce3e5d04..5d8101cd33 100755
--- a/test/functional/p2p_addrv2_relay.py
+++ b/test/functional/p2p_addrv2_relay.py
@@ -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