aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-03-28 09:06:46 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-04-02 10:12:43 +0200
commit44cabe6380d63505b30d4f854bbbe7926201a2a9 (patch)
treee7a9bbf6987c4a0d3c0c141e6029d2bde3183afd
parentbb78c1599e555fbece13ad50ab4b1dfa68ebc372 (diff)
Use static calls for GetRequiredFee and GetMinimumFee, remove make_pair from emplace_back
-rw-r--r--src/wallet/feebumper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp
index 61b7a730b5..9ebb36f36e 100644
--- a/src/wallet/feebumper.cpp
+++ b/src/wallet/feebumper.cpp
@@ -30,7 +30,7 @@ int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *pWal
for (auto& input : tx.vin) {
const auto mi = pWallet->mapWallet.find(input.prevout.hash);
assert(mi != pWallet->mapWallet.end() && input.prevout.n < mi->second.tx->vout.size());
- vCoins.emplace_back(std::make_pair(&(mi->second), input.prevout.n));
+ vCoins.emplace_back(&(mi->second), input.prevout.n);
}
if (!pWallet->DummySignTx(txNew, vCoins)) {
// This should never happen, because IsAllFromMe(ISMINE_SPENDABLE)
@@ -147,7 +147,7 @@ CFeeBumper::CFeeBumper(const CWallet *pWallet, const uint256 txidIn, int newConf
currentResult = BumpFeeResult::INVALID_PARAMETER;
return;
}
- CAmount requiredFee = pWallet->GetRequiredFee(maxNewTxSize);
+ CAmount requiredFee = CWallet::GetRequiredFee(maxNewTxSize);
if (totalFee < requiredFee) {
vErrors.push_back(strprintf("Insufficient totalFee (cannot be less than required fee %s)",
FormatMoney(requiredFee)));
@@ -159,11 +159,11 @@ CFeeBumper::CFeeBumper(const CWallet *pWallet, const uint256 txidIn, int newConf
} else {
// if user specified a confirm target then don't consider any global payTxFee
if (specifiedConfirmTarget) {
- nNewFee = pWallet->GetMinimumFee(maxNewTxSize, newConfirmTarget, mempool, CAmount(0));
+ nNewFee = CWallet::GetMinimumFee(maxNewTxSize, newConfirmTarget, mempool, CAmount(0));
}
// otherwise use the regular wallet logic to select payTxFee or default confirm target
else {
- nNewFee = pWallet->GetMinimumFee(maxNewTxSize, newConfirmTarget, mempool);
+ nNewFee = CWallet::GetMinimumFee(maxNewTxSize, newConfirmTarget, mempool);
}
nNewFeeRate = CFeeRate(nNewFee, maxNewTxSize);