Skip to content

Commit 7673a90

Browse files
committed
Move Channel fields into ChannelContext struct
This is a first step for simplifying the channel state and introducing new unfunded channel types that hold similar state before being promoted to funded channels. Essentially, we want the outer `Channel` type (and upcoming channel types) to wrap the context so we can apply typestate patterns to the that wrapper while also deduplicating code for common state and other internal fields.
1 parent 6775b95 commit 7673a90

File tree

5 files changed

+1333
-1311
lines changed

5 files changed

+1333
-1311
lines changed

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,12 +1436,12 @@ fn monitor_failed_no_reestablish_response() {
14361436
{
14371437
let mut node_0_per_peer_lock;
14381438
let mut node_0_peer_state_lock;
1439-
get_channel_ref!(nodes[0], nodes[1], node_0_per_peer_lock, node_0_peer_state_lock, channel_id).announcement_sigs_state = AnnouncementSigsState::PeerReceived;
1439+
get_channel_ref!(nodes[0], nodes[1], node_0_per_peer_lock, node_0_peer_state_lock, channel_id).context.announcement_sigs_state = AnnouncementSigsState::PeerReceived;
14401440
}
14411441
{
14421442
let mut node_1_per_peer_lock;
14431443
let mut node_1_peer_state_lock;
1444-
get_channel_ref!(nodes[1], nodes[0], node_1_per_peer_lock, node_1_peer_state_lock, channel_id).announcement_sigs_state = AnnouncementSigsState::PeerReceived;
1444+
get_channel_ref!(nodes[1], nodes[0], node_1_per_peer_lock, node_1_peer_state_lock, channel_id).context.announcement_sigs_state = AnnouncementSigsState::PeerReceived;
14451445
}
14461446

14471447
// Route the payment and deliver the initial commitment_signed (with a monitor update failure

0 commit comments

Comments
 (0)