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