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

Interpret sync_complete in reply_channel_range #790

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

bmancini55
Copy link
Contributor

Addresses changes to reply_channel_range per point 1 of lightning/bolts#826

This PR

  • renames full_information to sync_complete
  • removes check that interprets full_information=false as a failure response

LN Spec PR lightningdevkit#826 changes full_information to indicate completion of a
sequence of reply_channel_range messages.
@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #790 (a8d7fc4) into main (c7ddcd3) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #790      +/-   ##
==========================================
- Coverage   90.79%   90.78%   -0.02%     
==========================================
  Files          38       38              
  Lines       23168    23157      -11     
==========================================
- Hits        21036    21023      -13     
- Misses       2132     2134       +2     
Impacted Files Coverage Δ
lightning/src/ln/chan_utils.rs 97.33% <ø> (ø)
lightning/src/routing/router.rs 95.57% <ø> (ø)
lightning/src/ln/msgs.rs 89.46% <75.00%> (ø)
lightning/src/routing/network_graph.rs 90.89% <100.00%> (-0.09%) ⬇️
lightning/src/ln/functional_tests.rs 96.96% <0.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7ddcd3...77690fa. Read the comment docs.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheBlueMatt
Copy link
Collaborator

sync_complete is no longer interpreted anywhere, which is correct. This is, thus, trivial, so going to merge.

@TheBlueMatt TheBlueMatt merged commit 89be625 into lightningdevkit:main Feb 4, 2021
@bmancini55 bmancini55 deleted the sync_complete branch February 4, 2021 17:26
Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

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

Code Review ACK 77690fa

action: ErrorAction::IgnoreError,
});
}
log_debug!(self.logger, "Handling reply_channel_range peer={}, first_blocknum={}, number_of_blocks={}, sync_complete={}, scids={}", log_pubkey!(their_node_id), msg.first_blocknum, msg.number_of_blocks, msg.sync_complete, msg.short_channel_ids.len(),);
Copy link

Choose a reason for hiding this comment

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

Okay if I follow correctly, the fact we're stateless means we can't qualify if the range is effectively complete and sync_complete sets properly. But we don't care as peer was able to equivocate before, logging is best we can do.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right - we don't care if a given message indicates the end or not - we just respond to them as they come in.

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.

3 participants