mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Use self.generate not node.generate throughout tests
This commit is contained in:
parent
113b863f07
commit
eb02dbba3c
5 changed files with 5 additions and 5 deletions
|
@ -583,7 +583,7 @@ class ZMQTest (BitcoinTestFramework):
|
||||||
], ipv6=True)
|
], ipv6=True)
|
||||||
|
|
||||||
# Generate 1 block in nodes[0]
|
# Generate 1 block in nodes[0]
|
||||||
self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_UNSPENDABLE)
|
self.generatetoaddress(self.nodes[0], 1, ADDRESS_BCRT1_UNSPENDABLE)
|
||||||
|
|
||||||
# Should receive the same block hash
|
# Should receive the same block hash
|
||||||
assert_equal(self.nodes[0].getbestblockhash(), subscribers[0].receive().hex())
|
assert_equal(self.nodes[0].getbestblockhash(), subscribers[0].receive().hex())
|
||||||
|
|
|
@ -33,7 +33,7 @@ class P2PCompactBlocksBlocksOnly(BitcoinTestFramework):
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
def build_block_on_tip(self):
|
def build_block_on_tip(self):
|
||||||
blockhash = self.nodes[2].generate(1)[0]
|
blockhash = self.generate(self.nodes[2], 1)[0]
|
||||||
block_hex = self.nodes[2].getblock(blockhash=blockhash, verbosity=0)
|
block_hex = self.nodes[2].getblock(blockhash=blockhash, verbosity=0)
|
||||||
block = from_hex(CBlock(), block_hex)
|
block = from_hex(CBlock(), block_hex)
|
||||||
block.rehash()
|
block.rehash()
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||||
|
|
||||||
self.nodes[0].sendtoaddress(addr, 10)
|
self.nodes[0].sendtoaddress(addr, 10)
|
||||||
self.nodes[0].sendtoaddress(wallet.getnewaddress(), 10)
|
self.nodes[0].sendtoaddress(wallet.getnewaddress(), 10)
|
||||||
self.nodes[0].generate(6)
|
self.generate(self.nodes[0], 6)
|
||||||
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]
|
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]
|
||||||
|
|
||||||
# An external input without solving data should result in an error
|
# An external input without solving data should result in an error
|
||||||
|
|
|
@ -627,7 +627,7 @@ class PSBTTest(BitcoinTestFramework):
|
||||||
addr_info = self.nodes[0].getaddressinfo(addr)
|
addr_info = self.nodes[0].getaddressinfo(addr)
|
||||||
|
|
||||||
self.nodes[0].sendtoaddress(addr, 10)
|
self.nodes[0].sendtoaddress(addr, 10)
|
||||||
self.nodes[0].generate(6)
|
self.generate(self.nodes[0], 6)
|
||||||
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]
|
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]
|
||||||
|
|
||||||
# An external input without solving data should result in an error
|
# An external input without solving data should result in an error
|
||||||
|
|
|
@ -502,7 +502,7 @@ class WalletSendTest(BitcoinTestFramework):
|
||||||
|
|
||||||
self.nodes[0].sendtoaddress(addr, 10)
|
self.nodes[0].sendtoaddress(addr, 10)
|
||||||
self.nodes[0].sendtoaddress(ext_wallet.getnewaddress(), 10)
|
self.nodes[0].sendtoaddress(ext_wallet.getnewaddress(), 10)
|
||||||
self.nodes[0].generate(6)
|
self.generate(self.nodes[0], 6)
|
||||||
ext_utxo = ext_fund.listunspent(addresses=[addr])[0]
|
ext_utxo = ext_fund.listunspent(addresses=[addr])[0]
|
||||||
|
|
||||||
# An external input without solving data should result in an error
|
# An external input without solving data should result in an error
|
||||||
|
|
Loading…
Add table
Reference in a new issue