mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-01-19 05:43:55 +01:00
Add interactive tx constructor to all V2-related channel structs
Here we add the `interactive_tx_constructor` field to the `Channel`, `OutboundV2Channel`, and `InboundV2Channel` structs.
This commit is contained in:
parent
7e23afc9a8
commit
bb81598cba
@ -28,6 +28,7 @@ use bitcoin::secp256k1;
|
|||||||
use crate::ln::types::ChannelId;
|
use crate::ln::types::ChannelId;
|
||||||
use crate::types::payment::{PaymentPreimage, PaymentHash};
|
use crate::types::payment::{PaymentPreimage, PaymentHash};
|
||||||
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
|
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
|
||||||
|
use crate::ln::interactivetxs::InteractiveTxConstructor;
|
||||||
use crate::ln::msgs;
|
use crate::ln::msgs;
|
||||||
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
|
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
|
||||||
use crate::ln::script::{self, ShutdownScript};
|
use crate::ln::script::{self, ShutdownScript};
|
||||||
@ -8132,7 +8133,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
|
|||||||
msg.push_msat,
|
msg.push_msat,
|
||||||
msg.common_fields.clone(),
|
msg.common_fields.clone(),
|
||||||
)?,
|
)?,
|
||||||
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
|
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
|
||||||
};
|
};
|
||||||
Ok(chan)
|
Ok(chan)
|
||||||
}
|
}
|
||||||
@ -8266,6 +8267,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
|
|||||||
pub context: ChannelContext<SP>,
|
pub context: ChannelContext<SP>,
|
||||||
pub unfunded_context: UnfundedChannelContext,
|
pub unfunded_context: UnfundedChannelContext,
|
||||||
pub dual_funding_context: DualFundingChannelContext,
|
pub dual_funding_context: DualFundingChannelContext,
|
||||||
|
/// The current interactive transaction construction session under negotiation.
|
||||||
|
interactive_tx_constructor: Option<InteractiveTxConstructor>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
|
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
|
||||||
@ -8317,7 +8320,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
|
|||||||
their_funding_satoshis: 0,
|
their_funding_satoshis: 0,
|
||||||
funding_tx_locktime,
|
funding_tx_locktime,
|
||||||
funding_feerate_sat_per_1000_weight,
|
funding_feerate_sat_per_1000_weight,
|
||||||
}
|
},
|
||||||
|
interactive_tx_constructor: None,
|
||||||
};
|
};
|
||||||
Ok(chan)
|
Ok(chan)
|
||||||
}
|
}
|
||||||
@ -8391,6 +8395,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
|
|||||||
pub context: ChannelContext<SP>,
|
pub context: ChannelContext<SP>,
|
||||||
pub unfunded_context: UnfundedChannelContext,
|
pub unfunded_context: UnfundedChannelContext,
|
||||||
pub dual_funding_context: DualFundingChannelContext,
|
pub dual_funding_context: DualFundingChannelContext,
|
||||||
|
/// The current interactive transaction construction session under negotiation.
|
||||||
|
interactive_tx_constructor: Option<InteractiveTxConstructor>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
|
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
|
||||||
@ -8462,7 +8468,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
|
|||||||
their_funding_satoshis: msg.common_fields.funding_satoshis,
|
their_funding_satoshis: msg.common_fields.funding_satoshis,
|
||||||
funding_tx_locktime: msg.locktime,
|
funding_tx_locktime: msg.locktime,
|
||||||
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
|
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
|
||||||
}
|
},
|
||||||
|
interactive_tx_constructor: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(chan)
|
Ok(chan)
|
||||||
|
Loading…
Reference in New Issue
Block a user