Skip to content

Commit d610121

Browse files
committed
f make their_funding_satoshis an Option<u64>
1 parent 336b446 commit d610121

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
@@ -3825,7 +3825,7 @@ pub(super) struct DualFundingChannelContext {
38253825
/// The amount in satoshis we will be contributing to the channel.
38263826
pub our_funding_satoshis: u64,
38273827
/// The amount in satoshis our counterparty will be contributing to the channel.
3828-
pub their_funding_satoshis: u64,
3828+
pub their_funding_satoshis: Option<u64>,
38293829
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
38303830
/// to the current block height to align incentives against fee-sniping.
38313831
pub funding_tx_locktime: LockTime,
@@ -8412,7 +8412,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
84128412
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
84138413
dual_funding_context: DualFundingChannelContext {
84148414
our_funding_satoshis: funding_satoshis,
8415-
their_funding_satoshis: 0,
8415+
their_funding_satoshis: None,
84168416
funding_tx_locktime,
84178417
funding_feerate_sat_per_1000_weight,
84188418
our_funding_inputs: funding_inputs,
@@ -8518,7 +8518,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
85188518
// Now we can generate the `channel_id` since we have our counterparty's `revocation_basepoint`.
85198519
self.context.channel_id = ChannelId::v2_from_revocation_basepoints(
85208520
&self.context.get_holder_pubkeys().revocation_basepoint, &RevocationBasepoint::from(msg.common_fields.revocation_basepoint));
8521-
self.dual_funding_context.their_funding_satoshis = msg.funding_satoshis;
8521+
self.dual_funding_context.their_funding_satoshis = Some(msg.funding_satoshis);
85228522
self.context.do_accept_channel_checks(
85238523
default_limits, their_features, &msg.common_fields, get_v2_channel_reserve_satoshis(
85248524
msg.common_fields.dust_limit_satoshis, self.context.channel_value_satoshis))
@@ -8611,7 +8611,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
86118611
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
86128612
dual_funding_context: DualFundingChannelContext {
86138613
our_funding_satoshis: funding_satoshis,
8614-
their_funding_satoshis: msg.common_fields.funding_satoshis,
8614+
their_funding_satoshis: Some(msg.common_fields.funding_satoshis),
86158615
funding_tx_locktime: LockTime::from_consensus(msg.locktime),
86168616
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
86178617
our_funding_inputs: funding_inputs,

0 commit comments

Comments
 (0)