mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #11178: Add iswitness parameter to decode- and fundrawtransaction RPCs
6f39ac0Add test for decoderawtransaction bool (MeshCollider)bbdbe80Add iswitness parameter to decode- and fundrawtransaction RPCs (MeshCollider) Pull request description: Suggested in https://github.com/bitcoin/bitcoin/pull/10481#issuecomment-325244946, this adds the option to explicitly choose whether a serialized transaction should be decoded as a witness or non-witness transaction rather than relying on the heuristic checks in #10481. The parameter defaults to relying on #10481 if not included, but it overrides that if included. Tree-SHA512: d4846a5bb7d64dc19c516445488b00af329fc1f4181d9dfdf9f2382a086568edc98250a4ac7594e24a1bc231dfdee53c699b12c8380c355b920a67cc6770b7a9
This commit is contained in:
@@ -65,7 +65,9 @@ BOOST_AUTO_TEST_CASE(rpc_rawparams)
|
||||
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "size").get_int(), 193);
|
||||
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "version").get_int(), 1);
|
||||
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "locktime").get_int(), 0);
|
||||
BOOST_CHECK_THROW(r = CallRPC(std::string("decoderawtransaction ")+rawtx+" extra"), std::runtime_error);
|
||||
BOOST_CHECK_THROW(CallRPC(std::string("decoderawtransaction ")+rawtx+" extra"), std::runtime_error);
|
||||
BOOST_CHECK_NO_THROW(r = CallRPC(std::string("decoderawtransaction ")+rawtx+" false"));
|
||||
BOOST_CHECK_THROW(r = CallRPC(std::string("decoderawtransaction ")+rawtx+" false extra"), std::runtime_error);
|
||||
|
||||
BOOST_CHECK_THROW(CallRPC("signrawtransaction"), std::runtime_error);
|
||||
BOOST_CHECK_THROW(CallRPC("signrawtransaction null"), std::runtime_error);
|
||||
|
||||
Reference in New Issue
Block a user