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

multi: fix loopvar and enhance logging around channel reestablishment #8220

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

yyforyongyu
Copy link
Member

Attempt to provide more logs so we can find out what's the root cause in #8130

Copy link
Collaborator

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM 🌮

Copy link
Collaborator

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

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

Looks good!

channeldb/channel.go Outdated Show resolved Hide resolved
Comment on lines 2140 to 2141
log.Debugf("Skipped htlc due to onion has not "+
"matched: id=%v, update=%v incoming=%v",
Copy link
Collaborator

Choose a reason for hiding this comment

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

strange wording. Perhaps "Skipped htlc since the onion does not match" or "Skipped htlc due to onion mismatch"?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

Copy link
Collaborator

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

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

LGTM! 🔥

@yyforyongyu yyforyongyu force-pushed the enhance-logging-switch branch 3 times, most recently from 564310c to 8a601dd Compare November 24, 2023 18:34
@yyforyongyu yyforyongyu changed the title multi: enhance logging around channel reestablishment multi: fix loopvar and enhance logging around channel reestablishment Nov 24, 2023
Copy link
Collaborator

@ziggie1984 ziggie1984 left a comment

Choose a reason for hiding this comment

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

Thanks for this fix, LGTM ⭐️


// TestExtractPayDescs asserts that `extractPayDescs` can correctly turn a
// slice of htlcs into two slices of PaymentDescriptors.
func TestExtractPayDescs(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Important test 👍

Copy link
Collaborator

@Crypt-iQ Crypt-iQ left a comment

Choose a reason for hiding this comment

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

nice catch 🎣

onionHash := sha256.Sum256(htlc.OnionBlob[:])
if _, ok := remoteHtlcs[onionHash]; !ok {
log.Debugf("Skipped htlc due to onion mismatched: "+
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need these logs now that the issue is fixed? I think the debug logs might get spammier

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah downgraded to trace instead

@yyforyongyu yyforyongyu force-pushed the enhance-logging-switch branch from c804390 to 6b489c0 Compare November 27, 2023 16:18
@yyforyongyu yyforyongyu force-pushed the enhance-logging-switch branch from 6b489c0 to ae705e5 Compare November 27, 2023 20:15
@Roasbeef
Copy link
Member

Needs a rebase! (release notes conflict)

@yyforyongyu yyforyongyu force-pushed the enhance-logging-switch branch from ae705e5 to 4845b7a Compare November 28, 2023 06:07
@guggero guggero disabled auto-merge November 28, 2023 16:47
@guggero guggero merged commit 2731931 into lightningnetwork:master Nov 28, 2023
23 of 25 checks passed
@yyforyongyu yyforyongyu deleted the enhance-logging-switch branch November 28, 2023 17:16
@saubyk saubyk added this to the v0.17.3 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logging Related to the logging / debug output functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants