]> git.bitcoin.ninja Git - rust-lightning/commit
Move `Channel` fields into `ChannelContext` struct
authorDuncan Dean <duncangleeddean@gmail.com>
Tue, 7 Mar 2023 19:56:01 +0000 (21:56 +0200)
committerDuncan Dean <git@dunxen.dev>
Wed, 14 Jun 2023 11:42:22 +0000 (13:42 +0200)
commit883afb38d47cb5d8d8721a356302b1e41b7c476c
tree1ec56f8768d38e3cba5d59b60c9024697f20e6c8
parent74a9ed9c1978da15ca49b64fc81e01bbcb3f6ae1
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.
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/shutdown_tests.rs