mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-02-03 10:44:33 +00:00
Merge pull request #7010
10953a7 Better error message for fundrawtransaction w/ empty vout (Peter Todd) 61e1eb2 Actually use includeWatching value in fundrawtransaction (Peter Todd)
This commit is contained in:
commit
e0a5ef8427
@ -2418,9 +2418,12 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
|
|||||||
if (!DecodeHexTx(origTx, params[0].get_str()))
|
if (!DecodeHexTx(origTx, params[0].get_str()))
|
||||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
|
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
|
||||||
|
|
||||||
|
if (origTx.vout.size() == 0)
|
||||||
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
|
||||||
|
|
||||||
bool includeWatching = false;
|
bool includeWatching = false;
|
||||||
if (params.size() > 1)
|
if (params.size() > 1)
|
||||||
includeWatching = true;
|
includeWatching = params[1].get_bool();
|
||||||
|
|
||||||
CMutableTransaction tx(origTx);
|
CMutableTransaction tx(origTx);
|
||||||
CAmount nFee;
|
CAmount nFee;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user