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

Function TestLockPointValidity

src/txmempool.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38TRACEPOINT_SEMAPHORE(mempool, removed);
39
40bool TestLockPointValidity(CChain& active_chain, const LockPoints& lp)
41{
42 AssertLockHeld(cs_main);
43 // If there are relative lock times then the maxInputBlock will be set
44 // If there are no relative lock times, the LockPoints don't depend on the chain
45 if (lp.maxInputBlock) {
46 // Check whether active_chain is an extension of the block at which the LockPoints
47 // calculation was valid. If not LockPoints are no longer valid
48 if (!active_chain.Contains(*lp.maxInputBlock)) {
49 return false;
50 }
51 }
52
53 // LockPoints still valid
54 return true;
55}
56
57std::vector<CTxMemPoolEntry::CTxMemPoolEntryRef> CTxMemPool::GetChildren(const CTxMemPoolEntry& entry) const
58{

Callers 2

removeForReorgMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected