MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / TestPackageTransactions

Method TestPackageTransactions

src/miner.cpp:227–236  ·  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

225// - premature witness (in case segwit transactions are added to mempool before
226// segwit activation)
227bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package)
228{
229 for (CTxMemPool::txiter it : package) {
230 if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff))
231 return false;
232 if (!fIncludeWitness && it->GetTx().HasWitness())
233 return false;
234 }
235 return true;
236}
237
238void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
239{

Callers

nothing calls this directly

Calls 2

IsFinalTxFunction · 0.85
HasWitnessMethod · 0.45

Tested by

no test coverage detected