Skip to content

Commit 58f6ed0

Browse files
authored
Add notes
1 parent 872b186 commit 58f6ed0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_posts/2023-08-18-#2495.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ commit:
1111
---
1212

1313
## Notes
14-
15-
_Notes to follow soon!_
14+
* PR 2495 introduces the `ChannelPhase` enum with variants containing each existing channel struct so that they can be placed in a single map in `PeerState`.
15+
* This was one possible design considered during the conceptual review of the `Channel` split and refactoring work, but seemed to introduce too much complexity at the time
16+
when combined with the `ChannelInterface` type that was considered earlier but later dropped. At this stage it makes sense to take another look at using an enum map going forward
17+
to address some short-comings of the existing (however simple) multi-map approach for `PeerState` channels - one issue being higher order map lookups in a few cases.
1618

1719
## Questions
1820
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK](https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review)?
1921
1. What are the advantages of having a single map for unfunded and funded channel types per peer? What are the disadvantages?
20-
1. We still want different types to differentiate between different unfunded and funded channels, how do we manage to have (currently) three different channel types
22+
1. We still want different types to differentiate between different unfunded and funded channels, how do we manage to have three different channel types
2123
in a single `HashMap`?
2224
1. We'd like to introduce a proper type for channel IDs in LDK, as seen in [PR 2485](https://github.com/lightningdevkit/rust-lightning/pull/2485). If we further differentiate
2325
between channel types, such as having separate types for random V1 `temporary_channel_id`'s, txid-based V1 `channel_id`s, zero-XORed V2 `temporary_channel_id`s, and XORed V2 `channel_id`s,

0 commit comments

Comments
 (0)