change wallet pointers to references in feebumper

This commit is contained in:
Adam Jonas
2019-10-10 12:12:28 -04:00
parent 9be6666a4e
commit 66b29848c7
4 changed files with 48 additions and 48 deletions

View File

@@ -3417,7 +3417,7 @@ static UniValue bumpfee(const JSONRPCRequest& request)
res = feebumper::CreateTotalBumpTransaction(pwallet, hash, coin_control, totalFee, errors, old_fee, new_fee, mtx);
} else {
// Targeting feerate bump.
res = feebumper::CreateRateBumpTransaction(pwallet, hash, coin_control, errors, old_fee, new_fee, mtx);
res = feebumper::CreateRateBumpTransaction(*pwallet, hash, coin_control, errors, old_fee, new_fee, mtx);
}
if (res != feebumper::Result::OK) {
switch(res) {
@@ -3440,12 +3440,12 @@ static UniValue bumpfee(const JSONRPCRequest& request)
}
// sign bumped transaction
if (!feebumper::SignTransaction(pwallet, mtx)) {
if (!feebumper::SignTransaction(*pwallet, mtx)) {
throw JSONRPCError(RPC_WALLET_ERROR, "Can't sign transaction.");
}
// commit the bumped transaction
uint256 txid;
if (feebumper::CommitTransaction(pwallet, hash, std::move(mtx), errors, txid) != feebumper::Result::OK) {
if (feebumper::CommitTransaction(*pwallet, hash, std::move(mtx), errors, txid) != feebumper::Result::OK) {
throw JSONRPCError(RPC_WALLET_ERROR, errors[0]);
}
UniValue result(UniValue::VOBJ);