MCPcopy Create free account
hub / github.com/ElementsProject/elements / TestPackageTransactions

Method TestPackageTransactions

src/node/miner.cpp:272–283  ·  view source on GitHub ↗

Perform transaction-level checks before adding to block: - transaction finality (locktime) - premature witness (in case segwit transactions are added to mempool before segwit activation)

Source from the content-addressed store, hash-verified

270// - premature witness (in case segwit transactions are added to mempool before
271// segwit activation)
272bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package) const
273{
274 for (CTxMemPool::txiter it : package) {
275 if (!IsFinalTx(it->GetTx(), nHeight, m_lock_time_cutoff)) {
276 return false;
277 }
278 if (!fIncludeWitness && it->GetTx().HasWitness()) {
279 return false;
280 }
281 }
282 return true;
283}
284
285void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
286{

Callers

nothing calls this directly

Calls 3

IsFinalTxFunction · 0.85
GetTxMethod · 0.80
HasWitnessMethod · 0.45

Tested by

no test coverage detected