Uh oh!
There was an error while loading. Please reload this page.
Extract wire message handling into a method. - #629
Conversation
2da6b77 to
9c6d5eaCompareCodecov Report
@@ Coverage Diff @@## master #629 +/- ##
==========================================
- Coverage 91.26% 91.24% -0.02%
==========================================
Files 35 35 Lines 20918 20942 +24 ==========================================
+ Hits 19090 19109 +19 - Misses 1828 1833 +5
Continue to review full report at Codecov.
|
| enum MessageHandlingResult { | ||
| Ok, | ||
| PeerHandleError(PeerHandleError), | ||
| LightningError(LightningError), | ||
| } | ||
There was a problem hiding this comment.
Could you use Result with an enum error instead of rolling a custom result type? You should be able to match on complex patterns.
There was a problem hiding this comment.
You're right, that's a much better approach
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
valentinewallace
commented
Jun 1, 2020
Second all of Jeff's comments but this looks like a nice change. Might appreciate a high-level comment with what the end goal |
9c6d5ea to
73b379fCompare
valentinewallace
left a comment
There was a problem hiding this comment.
Thanks for the update -- looks good! Just some minor stuff
| return Err(PeerHandleError{ no_connection_possible: false }.into()); | ||
| } | ||
| log_info!( |
There was a problem hiding this comment.
Seems "unknown local flags" and "unknown global" flags could use some clarification, since they're the same thing bits here? Maybe just a comment if there's good reasoning, else rename one more descriptively and get rid of the other.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
73b379f to
bf11673Compare
TheBlueMatt
left a comment
There was a problem hiding this comment.
LGTM. Can you rebase?
This is a response to splitting lightningdevkit#585 into smaller components. This extraction should allow the subsequent creation of a trait for all message handling, thereby enabling more flexibility in the state machine, particularly for bindings.
836c7b0 to
3838c04Compare
This is a response to splitting #585 into smaller components. This extraction should allow the subsequent creation of a trait for all message handling, thereby enabling more flexibility in the state machine, particularly for bindings.