test: replace inv type magic numbers by constants
This commit is contained in:
1 parent
c1cd2b5a97
commit
eeaaa58d2c
12 files changed
+40
-36
No files matched your search
@@ -15,7 +15,7 @@ from collections import defaultdict
|
||||
|
||||
# Avoid wildcard * imports
|
||||
from test_framework.blocktools import (create_block, create_coinbase)
|
||||
from test_framework.messages import CInv
|
||||
from test_framework.messages import CInv, MSG_BLOCK
|
||||
from test_framework.mininode import (
|
||||
P2PInterface,
|
||||
mininode_lock,
|
||||
@@ -198,7 +198,7 @@ class ExampleTest(BitcoinTestFramework):
|
||||
|
||||
getdata_request = msg_getdata()
|
||||
for block in blocks:
|
||||
getdata_request.inv.append(CInv(2, block))
|
||||
getdata_request.inv.append(CInv(MSG_BLOCK, block))
|
||||
self.nodes[2].p2p.send_message(getdata_request)
|
||||
|
||||
# wait_until() will loop until a predicate condition is met. Use it to test properties of the
|
||||
|
||||
Reference in new issue
Block a user