Use generate* from TestFramework

The changes in feature_rbf can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
This commit is contained in:
MarcoFalke
2021-07-27 20:04:51 +02:00
parent faf7e92804
commit fab2e23b57
14 changed files with 83 additions and 84 deletions

View File

@@ -82,8 +82,8 @@ class ZMQTestSetupBlock:
raw transaction data.
"""
def __init__(self, node):
self.block_hash = node.generate(1)[0]
def __init__(self, test_framework, node):
self.block_hash = test_framework.generate(node, 1)[0]
coinbase = node.getblock(self.block_hash, 2)['tx'][0]
self.tx_hash = coinbase['txid']
self.raw_tx = coinbase['hex']
@@ -147,7 +147,7 @@ class ZMQTest (BitcoinTestFramework):
for sub in subscribers:
sub.socket.set(zmq.RCVTIMEO, 1000)
while True:
test_block = ZMQTestSetupBlock(self.nodes[0])
test_block = ZMQTestSetupBlock(self, self.nodes[0])
recv_failed = False
for sub in subscribers:
try: