Skip to content

Commit 2739a65

Browse files
committed
f make their_funding_satoshis an Option<u64>
1 parent ef43f1a commit 2739a65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3823,7 +3823,7 @@ pub(super) struct DualFundingChannelContext {
38233823
/// The amount in satoshis we will be contributing to the channel.
38243824
pub our_funding_satoshis: u64,
38253825
/// The amount in satoshis our counterparty will be contributing to the channel.
3826-
pub their_funding_satoshis: u64,
3826+
pub their_funding_satoshis: Option<u64>,
38273827
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
38283828
/// to the current block height to align incentives against fee-sniping.
38293829
pub funding_tx_locktime: LockTime,
@@ -8407,7 +8407,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
84078407
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
84088408
dual_funding_context: DualFundingChannelContext {
84098409
our_funding_satoshis: funding_satoshis,
8410-
their_funding_satoshis: 0,
8410+
their_funding_satoshis: None,
84118411
funding_tx_locktime,
84128412
funding_feerate_sat_per_1000_weight,
84138413
our_funding_inputs: funding_inputs,
@@ -8513,7 +8513,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
85138513
// Now we can generate the `channel_id` since we have our counterparty's `revocation_basepoint`.
85148514
self.context.channel_id = ChannelId::v2_from_revocation_basepoints(
85158515
&self.context.get_holder_pubkeys().revocation_basepoint, &RevocationBasepoint::from(msg.common_fields.revocation_basepoint));
8516-
self.dual_funding_context.their_funding_satoshis = msg.funding_satoshis;
8516+
self.dual_funding_context.their_funding_satoshis = Some(msg.funding_satoshis);
85178517
self.context.do_accept_channel_checks(
85188518
default_limits, their_features, &msg.common_fields, get_v2_channel_reserve_satoshis(
85198519
msg.common_fields.dust_limit_satoshis, self.context.channel_value_satoshis))
@@ -8606,7 +8606,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
86068606
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
86078607
dual_funding_context: DualFundingChannelContext {
86088608
our_funding_satoshis: funding_satoshis,
8609-
their_funding_satoshis: msg.common_fields.funding_satoshis,
8609+
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
86108610
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
86118611
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
86128612
our_funding_inputs: funding_inputs,

0 commit comments

Comments
 (0)