Consider using an enum for channel phase in single PeerState::channel_by_id
map
#2422
Labels
Milestone
PeerState::channel_by_id
map
#2422
In a very early iteration of #2077, an
enum
for different channel structs was considered for thechannel_by_id
map. However, that early iteration still dealt with theChannelInterface
trait which made it clunky. We should consider it again now that we have a simplifiedChannelContext
. This is completely internal toChannelManager
and so does not affect the public API.We'll also propose calling this enum
ChannelPhase
to not overload the "kind", "type", or "state" nomenclature. Its variants will contain the new channel structs.It would be worth considering an enum with a single map for a few good reasons:
ChannelPhase
variants with new channel structs does not mean adding a new map toPeerState
.One con I can see:
This depends on the completion of #2382 which is required for the 116 release.
(h/t @jkczyz for bringing this up in review of #2382)
The text was updated successfully, but these errors were encountered: