MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CheckSequenceLocksAtTip

Function CheckSequenceLocksAtTip

src/validation.cpp:254–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254bool CheckSequenceLocksAtTip(CBlockIndex* tip,
255 const LockPoints& lock_points)
256{
257 assert(tip != nullptr);
258
259 CBlockIndex index;
260 index.pprev = tip;
261 // CheckSequenceLocksAtTip() uses active_chainstate.m_chain.Height()+1 to evaluate
262 // height based locks because when SequenceLocks() is called within
263 // ConnectBlock(), the height of the block *being*
264 // evaluated is what is used.
265 // Thus if we want to know if a transaction can be part of the
266 // *next* block, we need to use one more than active_chainstate.m_chain.Height()
267 index.nHeight = tip->nHeight + 1;
268
269 return EvaluateSequenceLocks(index, {lock_points.height, lock_points.time});
270}
271
272static void LimitMempoolSize(CTxMemPool& pool, CCoinsViewCache& coins_cache)
273 EXCLUSIVE_LOCKS_REQUIRED(::cs_main, pool.cs)

Callers 3

PreChecksMethod · 0.85

Calls 1

EvaluateSequenceLocksFunction · 0.85

Tested by 1