add new command to clean height hint cache. #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new command is introduced to help noderunners suffering from the problem in lightningnetwork/lnd#8028 where for reasons still not known yet the height hint cache for some spending notifications is poisoned with wrong data leading to unrecognized spends. A wrong height hint entry can lead to situations where channels are never resolved internally and the associated funds might also be stuck indefinitely.
This command should be a temporary fix until we find the real reason why invalid height hints are populated in the table.
How to use the new command:
In case you have channels which are still in the waiting_force_close state, just call the command in the following way:
chantools dropheighthintcache --channeldb channel.db
In case you want to rescan the blockchain for a specific output you need to execute the command in the following way:
chantools dropheighthintcache --channeldb channel.db --chan_point bd278162f9843311f64c76715c7a5c903c0467dc2c9f76af84ecbab00764c8a1:0