| 352 | } |
| 353 | |
| 354 | bool 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 | |
| 372 | bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) |
| 373 | { |
no test coverage detected