-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aliasmgr+channeldb: stop deleting zero-conf edges from graph if reorg occurs #7292
aliasmgr+channeldb: stop deleting zero-conf edges from graph if reorg occurs #7292
Conversation
0b635f7
to
29166e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⛓️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7229
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 👍
The lint is complaining about a couple of things + the branch needs to be rebased and add release notes.
The itest have been migrated to the new format but this one can be updated in another PR (maybe we can create an issue with the good first issue
tag)
29166e3
to
11150fa
Compare
@Crypt-iQ, remember to re-request review from reviewers when ready |
Needs a rebase and fix for the linter. |
f9d4bb7
to
dcfff18
Compare
When a block is disconnected due to a reorg, DisconnectBlockAtHeight is called for the block height. Prior to this patch, it would delete every SCID in the graph with a block height greater than the disconnected height. This meant that a reorg would delete every zero-conf channel edge from the graph. The fix simply iterates up until the StartingAlias and deletes every SCID between the disconnected height and the StartingAlias height.
This itest asserts that zero-conf edges exist even after a reorg. Without the prior commit, this test fails.
dcfff18
to
b002879
Compare
Fixes #7229
Description of issue:
When a block is disconnected due to a reorg, DisconnectBlockAtHeight is called for the block height. Prior to this patch, it would delete every SCID in the graph with a block height greater than the disconnected height. This meant that a reorg would delete every zero-conf channel edge from the graph. The fix simply iterates up until the StartingAlias and deletes every SCID between the disconnected height and the StartingAlias height.
An integration test is included that asserts that the fix works.