Add ChannelReady event#1743
Conversation
|
|
33dbc0c to
405c589
Compare
|
Rebased on main and reworked the approach: a In the second commit I included the discussed renaming of Finally, the third commit includes a minor fix for unused import warnings. Tests currently still failing, looking into it. |
b7135dd to
2526975
Compare
f7d8c41 to
dabe755
Compare
|
Fixed tests and rebased on main. |
7fde0f7 to
f969b45
Compare
Codecov ReportBase: 90.73% // Head: 90.78% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1743 +/- ##
==========================================
+ Coverage 90.73% 90.78% +0.04%
==========================================
Files 87 87
Lines 47336 47608 +272
Branches 47336 47608 +272
==========================================
+ Hits 42950 43219 +269
- Misses 4386 4389 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
75861b2 to
735fa78
Compare
ae803b8 to
85ee73a
Compare
43e5538 to
71a999b
Compare
|
I now reverted the 'bubble-up' approach after all since all required checks are conducted in the Squashed changes. |
dunxen
left a comment
There was a problem hiding this comment.
Looks good. Just noticed we use "0conf" and "0-conf" in comments throughout the project. The hyphenated one looks "more correct". No biggie.
9033c30 to
f3c23a8
Compare
| let bs_htlc_claim_txn = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0); | ||
| assert_eq!(bs_htlc_claim_txn.len(), 1); | ||
| check_spends!(bs_htlc_claim_txn[0], as_commitment_tx); | ||
| expect_payment_forwarded!(nodes[1], nodes[0], nodes[2], None, false, false); |
There was a problem hiding this comment.
I'm not sure I understand why we have to move this up?
There was a problem hiding this comment.
Ah, we want to move this because the PaymentForwarded event is emitted by the handle_update_fulfill_htlc already and then the expect_channel_ready_event call in create_announced_chan_between_nodes fails due to 2 events being queued.
2ce2b15 to
2f10adf
Compare
|
I think this is good - can you squash the fixups into the appropriate commits? Its somewhat hard to re-review when the fixups are all at the end rather than with the commit they'll eventually get squashed into. |
2f10adf to
a8720b2
Compare
Think all fixups belonged to the first commit => Done. |
|
Is it worth having a release notes entry for this that says that "no ChannelReady events will be generated for existing channels, including those which become ready on 0.0.113"? I don't think its worth having complicated logic for whether we default |
|
Either way, current code LGTM, probably fine to squash given the reviewers currently. You can leave a diff-tree of the fixups if you want. |
This adds a `ChannelReady` event that is emitted as soon as a new channel becomes usable, i.e., after both sides have sent `channel_ready`.
We rename `ChannelState::ChannelFunded` to `ChannelState::ChannelReady` as we'll be in this state when both sides sent the `ChannelReady` messages, which may also be before funding in the 0conf case.
Previously introduced during release commit.
a8720b2 to
49dfcb6
Compare
|
Squashed fixups and included the pending changelog message |
Closes #1394.
This adds a
ChannelReadyevent that will be emitted as soon as a newchannel becomes usable, i.e., after both sides have sent
channel_ready.