diff options
| author | MarcoFalke <[email protected]> | 2016-06-06 17:50:50 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2016-06-07 13:12:57 +0200 |
| commit | fa7f4f577cbab2b4bc03b5427704c2ec16680c34 (patch) | |
| tree | 9ceac88ffe807278f80ca8d3afb3aa4a6de14207 /src/rpc/rawtransaction.cpp | |
| parent | [rpc] fundrawtransaction: Fix help text and interface (diff) | |
| download | discoin-fa7f4f577cbab2b4bc03b5427704c2ec16680c34.tar.xz discoin-fa7f4f577cbab2b4bc03b5427704c2ec16680c34.zip | |
[rpc] fundrawtransaction feeRate: Use BTC/kB
Also introduce UniValueType
UniValueType is a wrapper for UniValue::VType which allows setting
a typeAny flag. This flag indicates the type does not matter.
(Used by RPCTypeCheckObj)
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
| -rw-r--r-- | src/rpc/rawtransaction.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 483fe746c..f92ddb282 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -675,7 +675,12 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp) UniValue prevOut = p.get_obj(); - RPCTypeCheckObj(prevOut, boost::assign::map_list_of("txid", UniValue::VSTR)("vout", UniValue::VNUM)("scriptPubKey", UniValue::VSTR)); + RPCTypeCheckObj(prevOut, + { + {"txid", UniValueType(UniValue::VSTR)}, + {"vout", UniValueType(UniValue::VNUM)}, + {"scriptPubKey", UniValueType(UniValue::VSTR)}, + }); uint256 txid = ParseHashO(prevOut, "txid"); @@ -703,7 +708,13 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp) // if redeemScript given and not using the local wallet (private keys // given), add redeemScript to the tempKeystore so it can be signed: if (fGivenKeys && scriptPubKey.IsPayToScriptHash()) { - RPCTypeCheckObj(prevOut, boost::assign::map_list_of("txid", UniValue::VSTR)("vout", UniValue::VNUM)("scriptPubKey", UniValue::VSTR)("redeemScript",UniValue::VSTR)); + RPCTypeCheckObj(prevOut, + { + {"txid", UniValueType(UniValue::VSTR)}, + {"vout", UniValueType(UniValue::VNUM)}, + {"scriptPubKey", UniValueType(UniValue::VSTR)}, + {"redeemScript", UniValueType(UniValue::VSTR)}, + }); UniValue v = find_value(prevOut, "redeemScript"); if (!v.isNull()) { vector<unsigned char> rsData(ParseHexV(v, "redeemScript")); |