Accumulate result UniValue in SignTransaction

SignTransaction will be called multiple times in the future. Pass
it a result UniValue so that it can accumulate the results of multiple
SignTransaction passes.
This commit is contained in:
Andrew Chow
2019-11-18 14:56:52 -05:00
parent bc38bb9a60
commit 4b0c718f8f
4 changed files with 12 additions and 8 deletions

View File

@@ -3281,7 +3281,9 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request)
// Parse the prevtxs array
ParsePrevouts(request.params[1], nullptr, coins);
return SignTransaction(mtx, &*pwallet->GetLegacyScriptPubKeyMan(), coins, request.params[2]);
UniValue result(UniValue::VOBJ);
SignTransaction(mtx, &*pwallet->GetLegacyScriptPubKeyMan(), coins, request.params[2], result);
return result;
}
static UniValue bumpfee(const JSONRPCRequest& request)