mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[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)
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user