Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 695 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
return state.DoS(0, false, REJECT_NONSTANDARD, | return state.DoS(0, false, REJECT_NONSTANDARD, | ||||
"bad-txns-too-many-sigops", false, | "bad-txns-too-many-sigops", false, | ||||
strprintf("%d", nSigOpsCount)); | strprintf("%d", nSigOpsCount)); | ||||
} | } | ||||
CTxMemPoolEntry entry(ptx, nFees, nAcceptTime, chainActive.Height(), | CTxMemPoolEntry entry(ptx, nFees, nAcceptTime, chainActive.Height(), | ||||
fSpendsCoinbase, nSigOpsCount, lp); | fSpendsCoinbase, nSigOpsCount, lp); | ||||
unsigned int nSize = entry.GetTxSize(); | unsigned int nSize = entry.GetTxSize(); | ||||
unsigned int nVirtualSize = entry.GetTxVirtualSize(); | // Calculate virtual size for this tx in isolation. | ||||
// In principle we could update the ancestor info of the entry and | |||||
// use GetIncrementalVirtualSize which may be smaller, however this | |||||
// would create some odd 'parent pays for child' situations in times | |||||
// of mempool congestion. | |||||
unsigned int nVirtualSize = | |||||
GetVirtualTransactionSize(nSize, nSigOpsCount); | |||||
// No transactions are allowed below minRelayTxFee except from | // No transactions are allowed below minRelayTxFee except from | ||||
// disconnected blocks. | // disconnected blocks. | ||||
// Do not change this to use virtualsize without coordinating a network | // Do not change this to use virtualsize without coordinating a network | ||||
// policy upgrade. | // policy upgrade. | ||||
if (!bypass_limits && nModifiedFees < minRelayTxFee.GetFee(nSize)) { | if (!bypass_limits && nModifiedFees < minRelayTxFee.GetFee(nSize)) { | ||||
return state.DoS(0, false, REJECT_INSUFFICIENTFEE, | return state.DoS(0, false, REJECT_INSUFFICIENTFEE, | ||||
"min relay fee not met"); | "min relay fee not met"); | ||||
▲ Show 20 Lines • Show All 5,001 Lines • Show Last 20 Lines |