mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 17:02:21 +02:00
test: re-enable CLI test support by using EncodeDecimal in json.dumps()
As mentioned in https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648
This commit is contained in:
@@ -30,6 +30,7 @@ from .util import (
|
||||
rpc_url,
|
||||
wait_until,
|
||||
p2p_port,
|
||||
EncodeDecimal,
|
||||
)
|
||||
|
||||
BITCOIND_PROC_WAIT_TIMEOUT = 60
|
||||
@@ -480,7 +481,7 @@ def arg_to_cli(arg):
|
||||
if isinstance(arg, bool):
|
||||
return str(arg).lower()
|
||||
elif isinstance(arg, dict) or isinstance(arg, list):
|
||||
return json.dumps(arg)
|
||||
return json.dumps(arg, default=EncodeDecimal)
|
||||
else:
|
||||
return str(arg)
|
||||
|
||||
|
Reference in New Issue
Block a user