aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-13 17:58:52 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-13 18:00:06 +0100
commit702e8b70bd870f506ce8157e58b77cb7d0a0f98d (patch)
tree089aad138eced3caaf758d325214c28d1b83cc35 /src/test/rpc_tests.cpp
parent0f0229d0c36310eea329716fbc81541c7c3a62b1 (diff)
parentfac70134a9e3a1fc8e491aecb3c36d0184ba7b82 (diff)
downloadbitcoin-702e8b70bd870f506ce8157e58b77cb7d0a0f98d.tar.xz
Merge #11872: [rpc] createrawtransaction: Accept sorted outputs
fac70134a rpc: Update createrawtransaction examples (MarcoFalke) fa06dfce0 [rpc] createrawtransaction: Accept sorted outputs (MarcoFalke) 8acd25d85 rpc: Allow typeAny in RPCTypeCheck (MarcoFalke) Pull request description: The second parameter of the `createrawtransaction` is a dictionary of the outputs. This comes with at least two drawbacks: * In case of duplicate keys, either of them might silently disappear, with no user feedback at all. A user needs to make other mistakes, but this could eventually lead to abnormal tx fees. * A dictionary does not guarantee that keys are sorted. Again, a user needs to keep this in mind, as it could eventually lead to excessive tx fees. Even though my scenario of loss-of-funds is unlikely to happen, I see it as a inconvenience that should be fixed. Tree-SHA512: cd562f34f7f9f79c7d3433805971325c388c2035611be283980f4049066a622df4f0afdc11d7ac96662260ec0115147cb65e1ab5268f5a1b063242f3fe425f77
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r--src/test/rpc_tests.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 892e4f2dac..8d9f80ada0 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -52,7 +52,6 @@ BOOST_AUTO_TEST_CASE(rpc_rawparams)
BOOST_CHECK_THROW(CallRPC("createrawtransaction"), std::runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction null null"), std::runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction not_array"), std::runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [] []"), std::runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction {} {}"), std::runtime_error);
BOOST_CHECK_NO_THROW(CallRPC("createrawtransaction [] {}"));
BOOST_CHECK_THROW(CallRPC("createrawtransaction [] {} extra"), std::runtime_error);