Skip to content

Commit

Permalink
Merge pull request #7010
Browse files Browse the repository at this point in the history
10953a7 Better error message for fundrawtransaction w/ empty vout (Peter Todd)
61e1eb2 Actually use includeWatching value in fundrawtransaction (Peter Todd)
  • Loading branch information
gmaxwell committed Nov 14, 2015
2 parents dbd2c13 + 10953a7 commit e0a5ef8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2418,9 +2418,12 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
if (!DecodeHexTx(origTx, params[0].get_str()))
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;
if (params.size() > 1)
includeWatching = true;
includeWatching = params[1].get_bool();

CMutableTransaction tx(origTx);
CAmount nFee;
Expand Down

0 comments on commit e0a5ef8

Please sign in to comment.