-
Notifications
You must be signed in to change notification settings - Fork 367
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
[WIP] New ChannelId enum #2451
[WIP] New ChannelId enum #2451
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2451 +/- ##
=======================================
Coverage 90.33% 90.33%
=======================================
Files 106 106
Lines 55732 55792 +60
Branches 55732 55792 +60
=======================================
+ Hits 50347 50402 +55
- Misses 5385 5390 +5
☔ View full report in Codecov by Sentry. |
@@ -627,7 +627,7 @@ where | |||
log_trace!(logger, "Considering {} channels for invoice route hints", channels.len()); | |||
for channel in channels.into_iter().filter(|chan| chan.is_channel_ready) { | |||
if channel.get_inbound_payment_scid().is_none() || channel.counterparty.forwarding_info.is_none() { | |||
log_trace!(logger, "Ignoring channel {} for invoice route hints", log_bytes!(channel.channel_id)); | |||
log_trace!(logger, "Ignoring channel {} for invoice route hints", log_bytes!(channel.channel_id.bytes()[..])); |
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.
Since we're already touching it it would be nice to implement Display
/Debug
for ChannelId
and log in a more readable form, e.g., as a hex string.
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.
I've just done this (in #2485), and I've seen this comment only now :)
One fuzz test fails, to check |
Fixes #2408 . Introduces a new
ChannelId
enum, with two variants, for normal funding-tx-based and temporary ID, both wrapper around 32-byte data.TODO:
FundingTxBased
)