mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 20:12:48 +02:00
Merge #17705: test: re-enable CLI test support by using EncodeDecimal in json.dumps()
b6f9e3576a
test: re-enable CLI test support by using EncodeDecimal in json.dumps() (fanquake) Pull request description: As mentioned in https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648. ACKs for top commit: practicalswift: ACKb6f9e3576a
assuming Travis is happy too -- diff looks correct :) MarcoFalke: > ACKb6f9e35
assuming Travis is happy too -- diff looks correct :) Tree-SHA512: 79fa535cc1756c8ee610a3d6a316a1c4f036797d6990a5620e44985393a2e52f78450f8e0021d0a148c08705fd1ba765508464a365f9030ae0d2cacbd7a93e19
This commit is contained in:
@@ -30,6 +30,7 @@ from .util import (
|
||||
rpc_url,
|
||||
wait_until,
|
||||
p2p_port,
|
||||
EncodeDecimal,
|
||||
)
|
||||
|
||||
BITCOIND_PROC_WAIT_TIMEOUT = 60
|
||||
@@ -489,7 +490,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