mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 13:12:22 +02:00
test: replace inv type magic numbers by constants
This commit is contained in:
@@ -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