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

Function TestLockPointValidity

src/validation.cpp:354–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354bool TestLockPointValidity(const LockPoints* lp)
355{
356 AssertLockHeld(cs_main);
357 assert(lp);
358 // If there are relative lock times then the maxInputBlock will be set
359 // If there are no relative lock times, the LockPoints don't depend on the chain
360 if (lp->maxInputBlock) {
361 // Check whether chainActive is an extension of the block at which the LockPoints
362 // calculation was valid. If not LockPoints are no longer valid
363 if (!chainActive.Contains(lp->maxInputBlock)) {
364 return false;
365 }
366 }
367
368 // LockPoints still valid
369 return true;
370}
371
372bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints)
373{

Callers 1

removeForReorgMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected