mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 14:21:30 +02:00
Merge bitcoin/bitcoin#32932: test: Add missing convert_to_json_for_cli
fa0528479d
test: Add missing convert_to_json_for_cli (MarcoFalke) Pull request description: Currently the tests are failing on current master, if they use the `--usecli` flag. See https://github.com/bitcoin/bitcoin/runs/45676472375, https://cirrus-ci.com/task/5707897310543872. This can be reproduced locally via: ``` ./bld-cmake/test/functional/wallet_reorgsrestore.py --usecli ``` Fix it by adding the missing `hash_or_height=self.convert_to_json_for_cli(tip)` for the value that could either be a string (needs quotes in json), or a number (does not need quotes in json). ACKs for top commit: fanquake: ACKfa0528479d
Tree-SHA512: 3d6deafca1249b2266cfabcd883edc9daaf985c417035a4b0223da4693f4165f8c9ce91a0e128d626000c10c32fe31f323f4b3f6ea0d0b3a771237a4f1d4cf44
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -104,7 +104,7 @@ class ReorgsRestoreTest(BitcoinTestFramework):
|
||||
|
||||
# Disconnect tip and sync wallet state
|
||||
tip = wallet.getbestblockhash()
|
||||
tip_height = wallet.getblockstats(tip)["height"]
|
||||
tip_height = wallet.getblockstats(hash_or_height=self.convert_to_json_for_cli(tip))["height"]
|
||||
wallet.invalidateblock(tip)
|
||||
wallet.syncwithvalidationinterfacequeue()
|
||||
|
||||
|
Reference in New Issue
Block a user