Perform transaction-level checks before adding to block: - transaction finality (locktime) - premature witness (in case segwit transactions are added to mempool before segwit activation)
| 270 | // - premature witness (in case segwit transactions are added to mempool before |
| 271 | // segwit activation) |
| 272 | bool 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 | |
| 285 | void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) |
| 286 | { |
nothing calls this directly
no test coverage detected