Conversation
Codecov Report
@@ Coverage Diff @@
## main #187 +/- ##
==========================================
- Coverage 93.71% 93.67% -0.04%
==========================================
Files 179 179
Lines 4693 4696 +3
Branches 547 547
==========================================
+ Hits 4398 4399 +1
- Misses 163 165 +2
Partials 132 132
Continue to review full report at Codecov.
|
|
Not sure why the build error? 🤔 |
bmancini55
left a comment
There was a problem hiding this comment.
First pass is looking good. Couple minors and wanted your thoughts on a few properties in channel_update
bmancini55
left a comment
There was a problem hiding this comment.
Apologies for the review delay. Just a minor change to naming, otherwise looks good!
Check to make sure From the project root you can run |
|
|
Whew, ok, that took a bit to unpack what is going on. The short answer is that by adding types from the
You'll see that it now contains two directories, So... to repro the build error:
You can now fix the wire project by changing Rerunning |
|
Ah.. it's much simpler than that. Should have done a more thorough code review first! In a number of files you import |
Ooh, 😮 didn't think that would be the case. 👍 |
bmancini55
left a comment
There was a problem hiding this comment.
Need to make sure the tests for GraphMaanger are still valid. You'll either need to modify the helper to generate the Value types in the spec file or modify channelSettingsFromMessage to null check and return 0 if it's null.
| instance.htlcMaximumMsat = msg.htlcMaximumMsat; | ||
| instance.feeBaseMsat = msg.feeBaseMsat; | ||
| instance.feeProportionalMillionths = msg.feeProportionalMillionths; | ||
| instance.htlcMinimumMsat = msg.htlcMinimumMsat.msats; |
There was a problem hiding this comment.
Even though this shouldn't be null, let's perform a null check on these properties. This will allow the test for GraphManager to succeed.
|
|
||
| gossipEmitter.emit("message", createMsg()); | ||
| gossipEmitter.emit("message", createUpdateMsg(0)); | ||
| // gossipEmitter.emit("message", createUpdateMsg(0)); |
There was a problem hiding this comment.
This shouldn't be commented out. Need to either to null check inside channelSettingsFromMessage or fix the helper createUpdateMsg to generate an update message with instantiated Value types.
There was a problem hiding this comment.
It was getting bit trickier to handle so temporarily commented it out, it was showing TypeError: Cannot read property msats of undefined when working with createUpdateMsg.
Sure will try to work around it.
There was a problem hiding this comment.
Yep, that's a null ref exception. It's cause by crateUpdateMsg not populating all of the message properties https://github.com/Vib-UX/node-lightning/blob/fe82b0731df63180d43b00e64ee4db43aec2692f/packages/graph/__tests__/graph-manager.spec.ts#L102.
|
|
||
| gossipEmitter.emit("message", createMsg()); | ||
| gossipEmitter.emit("message", createUpdateMsg(1)); | ||
| // gossipEmitter.emit("message", createUpdateMsg(0)); |
bmancini55
left a comment
There was a problem hiding this comment.
Looks awesome! Great work!


fixes #183 wire: refactor message types to use @node-lightning/bitcoin types