MCPcopy Create free account
hub / github.com/ElementsProject/elements / TestLockPointValidity

Function TestLockPointValidity

src/txmempool.cpp:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63};
64
65bool TestLockPointValidity(CChain& active_chain, const LockPoints& lp)
66{
67 AssertLockHeld(cs_main);
68 // If there are relative lock times then the maxInputBlock will be set
69 // If there are no relative lock times, the LockPoints don't depend on the chain
70 if (lp.maxInputBlock) {
71 // Check whether active_chain is an extension of the block at which the LockPoints
72 // calculation was valid. If not LockPoints are no longer valid
73 if (!active_chain.Contains(lp.maxInputBlock)) {
74 return false;
75 }
76 }
77
78 // LockPoints still valid
79 return true;
80}
81
82CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& tx, CAmount fee,
83 int64_t time, unsigned int entry_height,

Callers 2

removeForReorgMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected