diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-09-12 10:04:15 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-09-12 10:04:15 -0300 |
commit | 2870a97121ebeb4750a8d72cd5f39d9600767bc4 (patch) | |
tree | 102300a9ed5c5b73408ddc0fd0500252118370f6 /test/functional/rpc_getblockfrompeer.py | |
parent | 5558d2f5496d8fe1c16f9edd1ef395fcd842e6fb (diff) | |
download | bitcoin-2870a97121ebeb4750a8d72cd5f39d9600767bc4.tar.xz |
RPC: unify arg type error message
We were throwing two different errors for the same problematic:
* "Expected type {expected], got {type}" --> RPCTypeCheckArgument()
* "JSON value of type {type} is not of expected type {expected}" --> UniValue::checkType()
Diffstat (limited to 'test/functional/rpc_getblockfrompeer.py')
-rwxr-xr-x | test/functional/rpc_getblockfrompeer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpc_getblockfrompeer.py b/test/functional/rpc_getblockfrompeer.py index 41e430d87e..278a343b2b 100755 --- a/test/functional/rpc_getblockfrompeer.py +++ b/test/functional/rpc_getblockfrompeer.py @@ -56,8 +56,8 @@ class GetBlockFromPeerTest(BitcoinTestFramework): self.log.info("Arguments must be valid") assert_raises_rpc_error(-8, "hash must be of length 64 (not 4, for '1234')", self.nodes[0].getblockfrompeer, "1234", peer_0_peer_1_id) - assert_raises_rpc_error(-3, "Expected type string, got number", self.nodes[0].getblockfrompeer, 1234, peer_0_peer_1_id) - assert_raises_rpc_error(-3, "Expected type number, got string", self.nodes[0].getblockfrompeer, short_tip, "0") + assert_raises_rpc_error(-3, "JSON value of type number is not of expected type string", self.nodes[0].getblockfrompeer, 1234, peer_0_peer_1_id) + assert_raises_rpc_error(-3, "JSON value of type string is not of expected type number", self.nodes[0].getblockfrompeer, short_tip, "0") self.log.info("We must already have the header") assert_raises_rpc_error(-1, "Block header missing", self.nodes[0].getblockfrompeer, "00" * 32, 0) |