Skip to content

Commit 6ede18a

Browse files
committed
fixup! Add ReserveType to ChannelDetails
document the selection of adaptive reserve type in the event a user sets and then unsets the anchor channels config
1 parent 1b2fcd0 commit 6ede18a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/types.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,13 @@ impl ChannelDetails {
677677
ReserveType::Adaptive
678678
}
679679
} else {
680+
// Edge case: if `AnchorChannelsConfig` was previously set and later
681+
// removed, we can no longer distinguish whether this anchor channel's
682+
// reserve was `Adaptive` or `TrustedPeersNoReserve`. We default to
683+
// `Adaptive` here, which may incorrectly override a prior
684+
// `TrustedPeersNoReserve` designation. This is acceptable since
685+
// unsetting `AnchorChannelsConfig` on a node with existing anchor
686+
// channels is not an expected operation.
680687
ReserveType::Adaptive
681688
}
682689
} else {

0 commit comments

Comments
 (0)