aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index db957cbd05..b9110d1271 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -655,7 +655,7 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
int64_t nDebit = GetDebit();
if (nDebit > 0) // debit>0 means we signed/sent this transaction
{
- int64_t nValueOut = GetValueOut(*this);
+ int64_t nValueOut = GetValueOut();
nFee = nDebit - nValueOut;
}
@@ -1342,15 +1342,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
strFailReason = _("Transaction too large");
return false;
}
- unsigned int nTxSizeMod = nBytes;
- // See miner.c's dPriority logic for the matching network-node side code.
- BOOST_FOREACH(const CTxIn& txin, (*(CTransaction*)&wtxNew).vin)
- {
- unsigned int offset = 41U + min(110U, (unsigned int)txin.scriptSig.size());
- if (nTxSizeMod > offset)
- nTxSizeMod -= offset;
- }
- dPriority /= nTxSizeMod;
+ dPriority = wtxNew.ComputePriority(dPriority, nBytes);
// Check that enough fee is included
int64_t nPayFee = nTransactionFee * (1 + (int64_t)nBytes / 1000);