Skip to content

Commit c4f9090

Browse files
committed
Merge bitcoin/bitcoin#32932: test: Add missing convert_to_json_for_cli
fa05284 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: ACK fa05284 Tree-SHA512: 3d6deafca1249b2266cfabcd883edc9daaf985c417035a4b0223da4693f4165f8c9ce91a0e128d626000c10c32fe31f323f4b3f6ea0d0b3a771237a4f1d4cf44
2 parents 83ae780 + fa05284 commit c4f9090

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/wallet_reorgsrestore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2019-2022 The Bitcoin Core developers
2+
# Copyright (c) 2019-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -104,7 +104,7 @@ def test_reorg_handling_during_unclean_shutdown(self):
104104

105105
# Disconnect tip and sync wallet state
106106
tip = wallet.getbestblockhash()
107-
tip_height = wallet.getblockstats(tip)["height"]
107+
tip_height = wallet.getblockstats(hash_or_height=self.convert_to_json_for_cli(tip))["height"]
108108
wallet.invalidateblock(tip)
109109
wallet.syncwithvalidationinterfacequeue()
110110

0 commit comments

Comments
 (0)