Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing maximum htlc value based on channel being public #2980

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,11 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {

/// Allowed in any state (including after shutdown), but will return none before TheirInitSent
pub fn get_holder_htlc_maximum_msat(&self) -> Option<u64> {
self.get_htlc_maximum_msat(self.holder_max_htlc_value_in_flight_msat)
if self.should_announce() == true {
self.get_htlc_maximum_msat(self.holder_max_htlc_value_in_flight_msat)
} else {
Some(self.holder_max_htlc_value_in_flight_msat)
}
}

/// Allowed in any state (including after shutdown)
Expand Down