Changeset View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 678 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
fSpendsCoinbase = true; | fSpendsCoinbase = true; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
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(); | // Since we haven't yet called UpdateEntryForAncestors, this may | ||||
// be larger than the actual virtual size increment for this tx. | |||||
unsigned int nVirtualSize = entry.GetIncrementalVirtualSize(); | |||||
deadalnix: This is probably not what you want to use here. It creates a Parent pays for child situation… | |||||
markblundebergAuthorUnsubmitted Done Inline ActionsJust to make sure we're on the same page, do you agree there is no change in behaviour here compared to before? Indeed if we were to use the actual incremental size (with UpdateEntryForAncestors data) it would create a PPFC parent-pays-for-child situation. I don't think that would hurt wallets since it would be strictly more permissive, and wallets ought not to rely on PPFC. I think it's just simpler leaving it like written, without PPFC. markblundeberg: Just to make sure we're on the same page, do you agree there is no change in behaviour here… | |||||
deadalnixUnsubmitted Not Done Inline ActionsIt create a situation where a transaction can stop being acceptable in the mempool once a block is mined. This is a no go. This is a problem for wallet as the cannot predict the fee they need to pay, as this fee can go UP after a block is mined - which they can't possibly know ahead of time and can even happen concurrently to the tx being broadcasted. The virtual size of the tx must be used to compute minimum fee. deadalnix: It create a situation where a transaction can stop being acceptable in the mempool once a block… | |||||
// 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. | ||||
if (nSigOpsCount > MAX_STANDARD_TX_SIGOPS) { | if (nSigOpsCount > MAX_STANDARD_TX_SIGOPS) { | ||||
return state.DoS(0, false, REJECT_NONSTANDARD, | return state.DoS(0, false, REJECT_NONSTANDARD, | ||||
▲ Show 20 Lines • Show All 4,965 Lines • Show Last 20 Lines |
This is probably not what you want to use here. It creates a Parent pays for child situation which, while more common IRL than child pay for parent, make things fairly unpredictable for wallets.