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

Function TestLockPointValidity

src/main.cpp:980–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

978}
979
980bool TestLockPointValidity(const LockPoints* lp)
981{
982 AssertLockHeld(cs_main);
983 assert(lp);
984 // If there are relative lock times then the maxInputBlock will be set
985 // If there are no relative lock times, the LockPoints don't depend on the chain
986 if (lp->maxInputBlock) {
987 // Check whether chainActive is an extension of the block at which the LockPoints
988 // calculation was valid. If not LockPoints are no longer valid
989 if (!chainActive.Contains(lp->maxInputBlock)) {
990 return false;
991 }
992 }
993
994 // LockPoints still valid
995 return true;
996}
997
998bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints)
999{

Callers 1

removeForReorgMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected