fundrawtransaction basics

This commit is contained in:
Jonas Schnelli 2014-12-17 17:49:18 +01:00 committed by Matt Corallo
parent 625eff80e9
commit 018828d666
10 changed files with 146 additions and 10 deletions

View file

@ -901,7 +901,8 @@ Value sendmany(const Array& params, bool fHelp)
CReserveKey keyChange(pwalletMain);
CAmount nFeeRequired = 0;
string strFailReason;
bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason);
CMutableTransaction newTx;
bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, newTx, keyChange, nFeeRequired, strFailReason);
if (!fCreated)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strFailReason);
if (!pwalletMain->CommitTransaction(wtx, keyChange))