mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
scripted-diff: Use generate* from TestFramework
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i \ 's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \ $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf') -END VERIFY SCRIPT-
This commit is contained in:
@@ -77,7 +77,7 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
"""Main test logic"""
|
||||
self.nodes[0].generate(BLOCKS)
|
||||
self.generate(self.nodes[0], BLOCKS)
|
||||
|
||||
self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
|
||||
cli_response = self.nodes[0].cli.getblockchaininfo()
|
||||
@@ -158,7 +158,7 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||
w1.sendtoaddress(w3.getnewaddress(), amounts[2])
|
||||
|
||||
# Mine a block to confirm; adds a block reward (50 BTC) to the default wallet.
|
||||
self.nodes[0].generate(1)
|
||||
self.generate(self.nodes[0], 1)
|
||||
|
||||
self.log.info("Test -getinfo with multiple wallets and -rpcwallet returns specified wallet balance")
|
||||
for i in range(len(wallets)):
|
||||
@@ -291,7 +291,7 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||
assert_raises_rpc_error(-19, WALLET_NOT_SPECIFIED, self.nodes[0].cli('-generate', 1, 2, 3).echo)
|
||||
else:
|
||||
self.log.info("*** Wallet not compiled; cli getwalletinfo and -getinfo wallet tests skipped")
|
||||
self.nodes[0].generate(25) # maintain block parity with the wallet_compiled conditional branch
|
||||
self.generate(self.nodes[0], 25) # maintain block parity with the wallet_compiled conditional branch
|
||||
|
||||
self.log.info("Test -version with node stopped")
|
||||
self.stop_node(0)
|
||||
|
Reference in New Issue
Block a user