MCPcopy Create free account
hub / github.com/LUX-Core/lux / TestLockPointValidity

Function TestLockPointValidity

src/consensus/validation.cpp:154–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool TestLockPointValidity(const LockPoints* lp)
155{
156 AssertLockHeld(cs_main);
157 assert(lp);
158 // If there are relative lock times then the maxInputBlock will be set
159 // If there are no relative lock times, the LockPoints don't depend on the chain
160 if (lp->maxInputBlock) {
161 // Check whether chainActive is an extension of the block at which the LockPoints
162 // calculation was valid. If not LockPoints are no longer valid
163 if (!chainActive.Contains(lp->maxInputBlock)) {
164 return false;
165 }
166 }
167
168 // LockPoints still valid
169 return true;
170}
171
172bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints)
173{

Callers 1

removeForReorgMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected