Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,910 Lines • ▼ Show 20 Lines | assert(txNew.nLockTime < LOCKTIME_THRESHOLD); | ||||
} | } | ||||
// Fill in dummy signatures for fee calculation. | // Fill in dummy signatures for fee calculation. | ||||
if (!DummySignTx(txNew, setCoins)) { | if (!DummySignTx(txNew, setCoins)) { | ||||
strFailReason = _("Signing transaction failed"); | strFailReason = _("Signing transaction failed"); | ||||
return false; | return false; | ||||
} | } | ||||
unsigned int nBytes = CTransaction(txNew).GetTotalSize(); | |||||
CTransaction txNewConst(txNew); | CTransaction txNewConst(txNew); | ||||
unsigned int nBytes = txNewConst.GetTotalSize(); | |||||
dPriority = txNewConst.ComputePriority(dPriority, nBytes); | dPriority = txNewConst.ComputePriority(dPriority, nBytes); | ||||
// Remove scriptSigs to eliminate the fee calculation dummy | // Remove scriptSigs to eliminate the fee calculation dummy | ||||
// signatures. | // signatures. | ||||
for (auto &vin : txNew.vin) { | for (auto &vin : txNew.vin) { | ||||
vin.scriptSig = CScript(); | vin.scriptSig = CScript(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,655 Lines • Show Last 20 Lines |