Skip to content

Commit 77dcbc4

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 49eb5ee commit 77dcbc4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/types.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,13 @@ impl ChannelDetails {
632632
ReserveType::Adaptive
633633
}
634634
} else {
635+
// Edge case: if `AnchorChannelsConfig` was previously set and later
636+
// removed, we can no longer distinguish whether this anchor channel's
637+
// reserve was `Adaptive` or `TrustedPeersNoReserve`. We default to
638+
// `Adaptive` here, which may incorrectly override a prior
639+
// `TrustedPeersNoReserve` designation. This is acceptable since
640+
// unsetting `AnchorChannelsConfig` on a node with existing anchor
641+
// channels is not an expected operation.
635642
ReserveType::Adaptive
636643
}
637644
} else {

0 commit comments

Comments
 (0)