| 152 | } |
| 153 | |
| 154 | bool 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 | |
| 172 | bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) |
| 173 | { |
no test coverage detected