1
0

verifier: fix off-by-one for max_checkpoint

if a wallet had a tx mined in the max_checkpoint block, in certain cases
we would leave it forever in the "unverified" state and remain stuck in "synchronizing..."
This commit is contained in:
SomberNight
2025-07-15 22:35:21 +00:00
parent 68a203336e
commit 5fad4bff8f
2 changed files with 3 additions and 3 deletions

View File

@@ -101,8 +101,8 @@ class LNChannelVerifier(NetworkJobOnDefaultServer):
continue
header = blockchain.read_header(block_height)
if header is None:
if block_height < constants.net.max_checkpoint():
await self.taskgroup.spawn(self.network.request_chunk(block_height, can_return_early=True))
if block_height <= constants.net.max_checkpoint():
await self.taskgroup.spawn(self.interface.request_chunk(block_height, can_return_early=True))
continue
self.started_verifying_channel.add(short_channel_id)
await self.taskgroup.spawn(self.verify_channel(block_height, short_channel_id))

View File

@@ -86,7 +86,7 @@ class SPV(NetworkJobOnDefaultServer):
# if it's in the checkpoint region, we still might not have the header
header = self.blockchain.read_header(tx_height)
if header is None:
if tx_height < constants.net.max_checkpoint():
if tx_height <= constants.net.max_checkpoint():
# FIXME these requests are not counted (self._requests_sent += 1)
await self.taskgroup.spawn(self.interface.request_chunk(tx_height, can_return_early=True))
continue