mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-05 05:02:06 +02:00
test: Add missing sync_blocks to wallet_hd
This commit is contained in:
@ -231,6 +231,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||||||
txid = self.nodes[0].sendtoaddress(addr, 1)
|
txid = self.nodes[0].sendtoaddress(addr, 1)
|
||||||
origin_rpc.sendrawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
origin_rpc.sendrawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
||||||
self.nodes[0].generate(1)
|
self.nodes[0].generate(1)
|
||||||
|
self.sync_blocks()
|
||||||
origin_rpc.gettransaction(txid)
|
origin_rpc.gettransaction(txid)
|
||||||
assert_raises_rpc_error(-5, 'Invalid or non-wallet transaction id', restore_rpc.gettransaction, txid)
|
assert_raises_rpc_error(-5, 'Invalid or non-wallet transaction id', restore_rpc.gettransaction, txid)
|
||||||
out_of_kp_txid = txid
|
out_of_kp_txid = txid
|
||||||
@ -241,6 +242,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||||||
txid = self.nodes[0].sendtoaddress(last_addr, 1)
|
txid = self.nodes[0].sendtoaddress(last_addr, 1)
|
||||||
origin_rpc.sendrawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
origin_rpc.sendrawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
||||||
self.nodes[0].generate(1)
|
self.nodes[0].generate(1)
|
||||||
|
self.sync_blocks()
|
||||||
origin_rpc.gettransaction(txid)
|
origin_rpc.gettransaction(txid)
|
||||||
restore_rpc.gettransaction(txid)
|
restore_rpc.gettransaction(txid)
|
||||||
assert_raises_rpc_error(-5, 'Invalid or non-wallet transaction id', restore_rpc.gettransaction, out_of_kp_txid)
|
assert_raises_rpc_error(-5, 'Invalid or non-wallet transaction id', restore_rpc.gettransaction, out_of_kp_txid)
|
||||||
|
Reference in New Issue
Block a user