Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 665 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
int64_t nSigOpsCount = | int64_t nSigOpsCount = | ||||
GetTransactionSigOpCount(tx, view, STANDARD_SCRIPT_VERIFY_FLAGS); | GetTransactionSigOpCount(tx, view, STANDARD_SCRIPT_VERIFY_FLAGS); | ||||
// nModifiedFees includes any fee deltas from PrioritiseTransaction | // nModifiedFees includes any fee deltas from PrioritiseTransaction | ||||
Amount nModifiedFees = nFees; | Amount nModifiedFees = nFees; | ||||
double nPriorityDummy = 0; | double nPriorityDummy = 0; | ||||
pool.ApplyDeltas(txid, nPriorityDummy, nModifiedFees); | pool.ApplyDeltas(txid, nPriorityDummy, nModifiedFees); | ||||
Amount inChainInputValue; | |||||
double dPriority = | |||||
view.GetPriority(tx, chainActive.Height(), inChainInputValue); | |||||
// Keep track of transactions that spend a coinbase, which we re-scan | // Keep track of transactions that spend a coinbase, which we re-scan | ||||
// during reorgs to ensure COINBASE_MATURITY is still met. | // during reorgs to ensure COINBASE_MATURITY is still met. | ||||
bool fSpendsCoinbase = false; | bool fSpendsCoinbase = false; | ||||
for (const CTxIn &txin : tx.vin) { | for (const CTxIn &txin : tx.vin) { | ||||
const Coin &coin = view.AccessCoin(txin.prevout); | const Coin &coin = view.AccessCoin(txin.prevout); | ||||
if (coin.IsCoinBase()) { | if (coin.IsCoinBase()) { | ||||
fSpendsCoinbase = true; | fSpendsCoinbase = true; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
CTxMemPoolEntry entry(ptx, nFees, nAcceptTime, dPriority, | CTxMemPoolEntry entry(ptx, nFees, nAcceptTime, chainActive.Height(), | ||||
chainActive.Height(), inChainInputValue, | |||||
fSpendsCoinbase, nSigOpsCount, lp); | fSpendsCoinbase, nSigOpsCount, lp); | ||||
unsigned int nSize = entry.GetTxSize(); | unsigned int nSize = entry.GetTxSize(); | ||||
// Check that the transaction doesn't have an excessive number of | // Check that the transaction doesn't have an excessive number of | ||||
// sigops, making it impossible to mine. Since the coinbase transaction | // sigops, making it impossible to mine. Since the coinbase transaction | ||||
// itself can contain sigops MAX_STANDARD_TX_SIGOPS is less than | // itself can contain sigops MAX_STANDARD_TX_SIGOPS is less than | ||||
// MAX_BLOCK_SIGOPS_PER_MB; we still consider this an invalid rather | // MAX_BLOCK_SIGOPS_PER_MB; we still consider this an invalid rather | ||||
// than merely non-standard transaction. | // than merely non-standard transaction. | ||||
▲ Show 20 Lines • Show All 4,963 Lines • Show Last 20 Lines |