Skip to content
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

lightningd: don't print zero blockheight while we're syncing. #5963

Merged

Conversation

rustyrussell
Copy link
Contributor

In v0.11 (71f7366) we changed lightningd to wait for gossipd to acknowledge blocks before updating blockheight: this resolved a problem which lnprototest had where it wanted to know when we'd fully digested a block.

However, it broke the syncing case: until then we don't even tell gossipd, so this stayed at zero. We should use the current blockheight for that corner case!

Fixes: #5894
Changelog-Fixed: JSON-RPC: getinfo blockheight no longer sits on 0 while we sync with bitcoind the first time.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au

In v0.11 (71f7366) we changed lightningd to wait for gossipd to
acknowledge blocks before updating blockheight: this resolved a problem
which lnprototest had where it wanted to know when we'd fully digested
a block.

However, it broke the syncing case: until then we don't even tell
gossipd, so this stayed at zero.  We should use the current blockheight
for that corner case!

Fixes: ElementsProject#5894
Changelog-Fixed: JSON-RPC: `getinfo` `blockheight` no longer sits on 0 while we sync with bitcoind the first time.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell added this to the v23.02 milestone Feb 6, 2023
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9a01993

Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9a01993

@endothermicdev endothermicdev merged commit 7b9f1b7 into ElementsProject:master Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: getinfo call no longer returns blockheight during initial chain sync
3 participants