Skip to content

Commit 3448c39

Browse files
committed
Rename Channel to FundedChannel
In preparation for hiding ChannelPhase inside a Channel type, rename Channel to FundedChannel.
1 parent 18d7b24 commit 3448c39

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

lightning/src/ln/channel.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ pub(super) enum ChannelPhase<SP: Deref> where SP::Target: SignerProvider {
11311131
UnfundedInboundV1(InboundV1Channel<SP>),
11321132
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
11331133
UnfundedV2(PendingV2Channel<SP>),
1134-
Funded(Channel<SP>),
1134+
Funded(FundedChannel<SP>),
11351135
}
11361136

11371137
impl<'a, SP: Deref> ChannelPhase<SP> where
@@ -1169,15 +1169,15 @@ impl<'a, SP: Deref> ChannelPhase<SP> where
11691169
self.as_funded().is_some()
11701170
}
11711171

1172-
pub fn as_funded(&self) -> Option<&Channel<SP>> {
1172+
pub fn as_funded(&self) -> Option<&FundedChannel<SP>> {
11731173
if let ChannelPhase::Funded(channel) = self {
11741174
Some(channel)
11751175
} else {
11761176
None
11771177
}
11781178
}
11791179

1180-
pub fn as_funded_mut(&mut self) -> Option<&mut Channel<SP>> {
1180+
pub fn as_funded_mut(&mut self) -> Option<&mut FundedChannel<SP>> {
11811181
if let ChannelPhase::Funded(channel) = self {
11821182
Some(channel)
11831183
} else {
@@ -1376,12 +1376,12 @@ where
13761376
}
13771377
}
13781378

1379-
impl<SP: Deref> From<Channel<SP>> for ChannelPhase<SP>
1379+
impl<SP: Deref> From<FundedChannel<SP>> for ChannelPhase<SP>
13801380
where
13811381
SP::Target: SignerProvider,
13821382
<SP::Target as SignerProvider>::EcdsaSigner: ChannelSigner,
13831383
{
1384-
fn from(channel: Channel<SP>) -> Self {
1384+
fn from(channel: FundedChannel<SP>) -> Self {
13851385
ChannelPhase::Funded(channel)
13861386
}
13871387
}
@@ -1502,7 +1502,7 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
15021502
/// the future when the signer indicates it may have a signature for us.
15031503
///
15041504
/// This flag is set in such a case. Note that we don't need to persist this as we'll end up
1505-
/// setting it again as a side-effect of [`Channel::channel_reestablish`].
1505+
/// setting it again as a side-effect of [`FundedChannel::channel_reestablish`].
15061506
signer_pending_commitment_update: bool,
15071507
/// Similar to [`Self::signer_pending_commitment_update`] but we're waiting to send either a
15081508
/// [`msgs::FundingCreated`] or [`msgs::FundingSigned`] depending on if this channel is
@@ -1898,7 +1898,7 @@ impl<SP: Deref> InitialRemoteCommitmentReceiver<SP> for InboundV1Channel<SP> whe
18981898
}
18991899
}
19001900

1901-
impl<SP: Deref> InitialRemoteCommitmentReceiver<SP> for Channel<SP> where SP::Target: SignerProvider {
1901+
impl<SP: Deref> InitialRemoteCommitmentReceiver<SP> for FundedChannel<SP> where SP::Target: SignerProvider {
19021902
fn context(&self) -> &ChannelContext<SP> {
19031903
&self.context
19041904
}
@@ -2128,7 +2128,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
21282128
if open_channel_fields.htlc_minimum_msat >= full_channel_value_msat {
21292129
return Err(ChannelError::close(format!("Minimum htlc value ({}) was larger than full channel value ({})", open_channel_fields.htlc_minimum_msat, full_channel_value_msat)));
21302130
}
2131-
Channel::<SP>::check_remote_fee(&channel_type, fee_estimator, open_channel_fields.commitment_feerate_sat_per_1000_weight, None, &&logger)?;
2131+
FundedChannel::<SP>::check_remote_fee(&channel_type, fee_estimator, open_channel_fields.commitment_feerate_sat_per_1000_weight, None, &&logger)?;
21322132

21332133
let max_counterparty_selected_contest_delay = u16::min(config.channel_handshake_limits.their_to_self_delay, MAX_LOCAL_BREAKDOWN_TIMEOUT);
21342134
if open_channel_fields.to_self_delay > max_counterparty_selected_contest_delay {
@@ -4398,7 +4398,7 @@ pub(super) struct DualFundingChannelContext {
43984398

43994399
// Holder designates channel data owned for the benefit of the user client.
44004400
// Counterparty designates channel data owned by the another channel participant entity.
4401-
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4401+
pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
44024402
pub context: ChannelContext<SP>,
44034403
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
44044404
holder_commitment_point: HolderCommitmentPoint,
@@ -4413,7 +4413,7 @@ struct CommitmentTxInfoCached {
44134413
feerate: u32,
44144414
}
44154415

4416-
/// Contents of a wire message that fails an HTLC backwards. Useful for [`Channel::fail_htlc`] to
4416+
/// Contents of a wire message that fails an HTLC backwards. Useful for [`FundedChannel::fail_htlc`] to
44174417
/// fail with either [`msgs::UpdateFailMalformedHTLC`] or [`msgs::UpdateFailHTLC`] as needed.
44184418
trait FailHTLCContents {
44194419
type Message: FailHTLCMessageName;
@@ -4469,7 +4469,7 @@ impl FailHTLCMessageName for msgs::UpdateFailMalformedHTLC {
44694469
}
44704470
}
44714471

4472-
impl<SP: Deref> Channel<SP> where
4472+
impl<SP: Deref> FundedChannel<SP> where
44734473
SP::Target: SignerProvider,
44744474
<SP::Target as SignerProvider>::EcdsaSigner: EcdsaChannelSigner
44754475
{
@@ -6271,7 +6271,7 @@ impl<SP: Deref> Channel<SP> where
62716271
if self.context.channel_state.is_peer_disconnected() {
62726272
return Err(ChannelError::close("Peer sent update_fee when we needed a channel_reestablish".to_owned()));
62736273
}
6274-
Channel::<SP>::check_remote_fee(&self.context.channel_type, fee_estimator, msg.feerate_per_kw, Some(self.context.feerate_per_kw), logger)?;
6274+
FundedChannel::<SP>::check_remote_fee(&self.context.channel_type, fee_estimator, msg.feerate_per_kw, Some(self.context.feerate_per_kw), logger)?;
62756275

62766276
self.context.pending_update_fee = Some((msg.feerate_per_kw, FeeUpdateState::RemoteAnnounced));
62776277
self.context.update_time_counter += 1;
@@ -8682,7 +8682,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
86828682
/// If this call is successful, broadcast the funding transaction (and not before!)
86838683
pub fn funding_signed<L: Deref>(
86848684
mut self, msg: &msgs::FundingSigned, best_block: BestBlock, signer_provider: &SP, logger: &L
8685-
) -> Result<(Channel<SP>, ChannelMonitor<<SP::Target as SignerProvider>::EcdsaSigner>), (OutboundV1Channel<SP>, ChannelError)>
8685+
) -> Result<(FundedChannel<SP>, ChannelMonitor<<SP::Target as SignerProvider>::EcdsaSigner>), (OutboundV1Channel<SP>, ChannelError)>
86868686
where
86878687
L::Target: Logger
86888688
{
@@ -8709,7 +8709,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
87098709

87108710
log_info!(logger, "Received funding_signed from peer for channel {}", &self.context.channel_id());
87118711

8712-
let mut channel = Channel {
8712+
let mut channel = FundedChannel {
87138713
context: self.context,
87148714
interactive_tx_signing_session: None,
87158715
holder_commitment_point,
@@ -8930,7 +8930,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
89308930

89318931
pub fn funding_created<L: Deref>(
89328932
mut self, msg: &msgs::FundingCreated, best_block: BestBlock, signer_provider: &SP, logger: &L
8933-
) -> Result<(Channel<SP>, Option<msgs::FundingSigned>, ChannelMonitor<<SP::Target as SignerProvider>::EcdsaSigner>), (Self, ChannelError)>
8933+
) -> Result<(FundedChannel<SP>, Option<msgs::FundingSigned>, ChannelMonitor<<SP::Target as SignerProvider>::EcdsaSigner>), (Self, ChannelError)>
89348934
where
89358935
L::Target: Logger
89368936
{
@@ -8974,7 +8974,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
89748974

89758975
// Promote the channel to a full-fledged one now that we have updated the state and have a
89768976
// `ChannelMonitor`.
8977-
let mut channel = Channel {
8977+
let mut channel = FundedChannel {
89788978
context: self.context,
89798979
interactive_tx_signing_session: None,
89808980
holder_commitment_point,
@@ -9329,11 +9329,11 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
93299329
self.generate_accept_channel_v2_message()
93309330
}
93319331

9332-
pub fn into_channel(self, signing_session: InteractiveTxSigningSession) -> Result<Channel<SP>, ChannelError>{
9332+
pub fn into_channel(self, signing_session: InteractiveTxSigningSession) -> Result<FundedChannel<SP>, ChannelError>{
93339333
let holder_commitment_point = self.unfunded_context.holder_commitment_point.ok_or(ChannelError::close(
93349334
format!("Expected to have holder commitment points available upon finishing interactive tx construction for channel {}",
93359335
self.context.channel_id())))?;
9336-
let channel = Channel {
9336+
let channel = FundedChannel {
93379337
context: self.context,
93389338
interactive_tx_signing_session: Some(signing_session),
93399339
holder_commitment_point,
@@ -9425,7 +9425,7 @@ impl Readable for AnnouncementSigsState {
94259425
}
94269426
}
94279427

9428-
impl<SP: Deref> Writeable for Channel<SP> where SP::Target: SignerProvider {
9428+
impl<SP: Deref> Writeable for FundedChannel<SP> where SP::Target: SignerProvider {
94299429
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), io::Error> {
94309430
// Note that we write out as if remove_uncommitted_htlcs_and_mark_paused had just been
94319431
// called.
@@ -9804,7 +9804,7 @@ impl<SP: Deref> Writeable for Channel<SP> where SP::Target: SignerProvider {
98049804
}
98059805

98069806
const MAX_ALLOC_SIZE: usize = 64*1024;
9807-
impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c ChannelTypeFeatures)> for Channel<SP>
9807+
impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c ChannelTypeFeatures)> for FundedChannel<SP>
98089808
where
98099809
ES::Target: EntropySource,
98109810
SP::Target: SignerProvider
@@ -10277,7 +10277,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
1027710277
},
1027810278
};
1027910279

10280-
Ok(Channel {
10280+
Ok(FundedChannel {
1028110281
context: ChannelContext {
1028210282
user_id,
1028310283

@@ -10435,7 +10435,7 @@ mod tests {
1043510435
use crate::ln::channel_keys::{RevocationKey, RevocationBasepoint};
1043610436
use crate::ln::channelmanager::{self, HTLCSource, PaymentId};
1043710437
use crate::ln::channel::InitFeatures;
10438-
use crate::ln::channel::{AwaitingChannelReadyFlags, Channel, ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, HTLCUpdateAwaitingACK, commit_tx_fee_sat};
10438+
use crate::ln::channel::{AwaitingChannelReadyFlags, ChannelState, FundedChannel, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, HTLCUpdateAwaitingACK, commit_tx_fee_sat};
1043910439
use crate::ln::channel::{MAX_FUNDING_SATOSHIS_NO_WUMBO, TOTAL_BITCOIN_SUPPLY_SATOSHIS, MIN_THEIR_CHAN_RESERVE_SATOSHIS};
1044010440
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
1044110441
use crate::ln::msgs;
@@ -11101,7 +11101,7 @@ mod tests {
1110111101
let mut s = crate::io::Cursor::new(&encoded_chan);
1110211102
let mut reader = crate::util::ser::FixedLengthReader::new(&mut s, encoded_chan.len() as u64);
1110311103
let features = channelmanager::provided_channel_type_features(&config);
11104-
let decoded_chan = Channel::read(&mut reader, (&&keys_provider, &&keys_provider, 0, &features)).unwrap();
11104+
let decoded_chan = FundedChannel::read(&mut reader, (&&keys_provider, &&keys_provider, 0, &features)).unwrap();
1110511105
assert_eq!(decoded_chan.context.pending_outbound_htlcs, pending_outbound_htlcs);
1110611106
assert_eq!(decoded_chan.context.holding_cell_htlc_updates, holding_cell_htlc_updates);
1110711107
}

lightning/src/ln/channelmanager.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use crate::events::{self, Event, EventHandler, EventsProvider, InboundChannelFun
4848
use crate::ln::inbound_payment;
4949
use crate::ln::types::ChannelId;
5050
use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
51-
use crate::ln::channel::{self, Channel, ChannelPhase, ChannelError, ChannelUpdateStatus, ShutdownResult, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext};
51+
use crate::ln::channel::{self, ChannelPhase, ChannelError, ChannelUpdateStatus, FundedChannel, ShutdownResult, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext};
5252
#[cfg(any(dual_funding, splicing))]
5353
use crate::ln::channel::PendingV2Channel;
5454
use crate::ln::channel_state::ChannelDetails;
@@ -150,7 +150,7 @@ use crate::ln::script::ShutdownScript;
150150
// our payment, which we can use to decode errors or inform the user that the payment was sent.
151151

152152
/// Information about where a received HTLC('s onion) has indicated the HTLC should go.
153-
#[derive(Clone)] // See Channel::revoke_and_ack for why, tl;dr: Rust bug
153+
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
154154
#[cfg_attr(test, derive(Debug, PartialEq))]
155155
pub enum PendingHTLCRouting {
156156
/// An HTLC which should be forwarded on to another node.
@@ -270,7 +270,7 @@ impl PendingHTLCRouting {
270270

271271
/// Information about an incoming HTLC, including the [`PendingHTLCRouting`] describing where it
272272
/// should go next.
273-
#[derive(Clone)] // See Channel::revoke_and_ack for why, tl;dr: Rust bug
273+
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
274274
#[cfg_attr(test, derive(Debug, PartialEq))]
275275
pub struct PendingHTLCInfo {
276276
/// Further routing details based on whether the HTLC is being forwarded or received.
@@ -313,14 +313,14 @@ pub struct PendingHTLCInfo {
313313
pub skimmed_fee_msat: Option<u64>,
314314
}
315315

316-
#[derive(Clone)] // See Channel::revoke_and_ack for why, tl;dr: Rust bug
316+
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
317317
pub(super) enum HTLCFailureMsg {
318318
Relay(msgs::UpdateFailHTLC),
319319
Malformed(msgs::UpdateFailMalformedHTLC),
320320
}
321321

322322
/// Stores whether we can't forward an HTLC or relevant forwarding info
323-
#[derive(Clone)] // See Channel::revoke_and_ack for why, tl;dr: Rust bug
323+
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
324324
pub(super) enum PendingHTLCStatus {
325325
Forward(PendingHTLCInfo),
326326
Fail(HTLCFailureMsg),
@@ -820,7 +820,7 @@ pub(super) const MIN_HTLC_RELAY_HOLDING_CELL_MILLIS: u64 = 100;
820820

821821
/// For events which result in both a RevokeAndACK and a CommitmentUpdate, by default they should
822822
/// be sent in the order they appear in the return value, however sometimes the order needs to be
823-
/// variable at runtime (eg Channel::channel_reestablish needs to re-send messages in the order
823+
/// variable at runtime (eg FundedChannel::channel_reestablish needs to re-send messages in the order
824824
/// they were originally sent). In those cases, this enum is also returned.
825825
#[derive(Clone, PartialEq, Debug)]
826826
pub(super) enum RAACommitmentOrder {
@@ -3680,7 +3680,7 @@ where
36803680
Ok(temporary_channel_id)
36813681
}
36823682

3683-
fn list_funded_channels_with_filter<Fn: FnMut(&(&ChannelId, &Channel<SP>)) -> bool + Copy>(&self, f: Fn) -> Vec<ChannelDetails> {
3683+
fn list_funded_channels_with_filter<Fn: FnMut(&(&ChannelId, &FundedChannel<SP>)) -> bool + Copy>(&self, f: Fn) -> Vec<ChannelDetails> {
36843684
// Allocate our best estimate of the number of channels we have in the `res`
36853685
// Vec. Sadly the `short_to_chan_info` map doesn't cover channels without
36863686
// a scid or a scid alias, and the `outpoint_to_peer` shouldn't be used outside
@@ -4204,7 +4204,7 @@ where
42044204
}
42054205

42064206
fn can_forward_htlc_to_outgoing_channel(
4207-
&self, chan: &mut Channel<SP>, msg: &msgs::UpdateAddHTLC, next_packet: &NextPacketDetails
4207+
&self, chan: &mut FundedChannel<SP>, msg: &msgs::UpdateAddHTLC, next_packet: &NextPacketDetails
42084208
) -> Result<(), (&'static str, u16)> {
42094209
if !chan.context.should_announce() && !self.default_configuration.accept_forwards_to_priv_channels {
42104210
// Note that the behavior here should be identical to the above block - we
@@ -4245,7 +4245,7 @@ where
42454245

42464246
/// Executes a callback `C` that returns some value `X` on the channel found with the given
42474247
/// `scid`. `None` is returned when the channel is not found.
4248-
fn do_funded_channel_callback<X, C: Fn(&mut Channel<SP>) -> X>(
4248+
fn do_funded_channel_callback<X, C: Fn(&mut FundedChannel<SP>) -> X>(
42494249
&self, scid: u64, callback: C,
42504250
) -> Option<X> {
42514251
let (counterparty_node_id, channel_id) = match self.short_to_chan_info.read().unwrap().get(&scid).cloned() {
@@ -4268,7 +4268,7 @@ where
42684268
fn can_forward_htlc(
42694269
&self, msg: &msgs::UpdateAddHTLC, next_packet_details: &NextPacketDetails
42704270
) -> Result<(), (&'static str, u16)> {
4271-
match self.do_funded_channel_callback(next_packet_details.outgoing_scid, |chan: &mut Channel<SP>| {
4271+
match self.do_funded_channel_callback(next_packet_details.outgoing_scid, |chan: &mut FundedChannel<SP>| {
42724272
self.can_forward_htlc_to_outgoing_channel(chan, msg, next_packet_details)
42734273
}) {
42744274
Some(Ok(())) => {},
@@ -4439,7 +4439,7 @@ where
44394439
///
44404440
/// [`channel_update`]: msgs::ChannelUpdate
44414441
/// [`internal_closing_signed`]: Self::internal_closing_signed
4442-
fn get_channel_update_for_broadcast(&self, chan: &Channel<SP>) -> Result<msgs::ChannelUpdate, LightningError> {
4442+
fn get_channel_update_for_broadcast(&self, chan: &FundedChannel<SP>) -> Result<msgs::ChannelUpdate, LightningError> {
44434443
if !chan.context.should_announce() {
44444444
return Err(LightningError {
44454445
err: "Cannot broadcast a channel_update for a private channel".to_owned(),
@@ -4465,7 +4465,7 @@ where
44654465
///
44664466
/// [`channel_update`]: msgs::ChannelUpdate
44674467
/// [`internal_closing_signed`]: Self::internal_closing_signed
4468-
fn get_channel_update_for_unicast(&self, chan: &Channel<SP>) -> Result<msgs::ChannelUpdate, LightningError> {
4468+
fn get_channel_update_for_unicast(&self, chan: &FundedChannel<SP>) -> Result<msgs::ChannelUpdate, LightningError> {
44694469
let logger = WithChannelContext::from(&self.logger, &chan.context, None);
44704470
log_trace!(logger, "Attempting to generate channel update for channel {}", chan.context.channel_id());
44714471
let short_channel_id = match chan.context.get_short_channel_id().or(chan.context.latest_inbound_scid_alias()) {
@@ -5603,7 +5603,7 @@ where
56035603
};
56045604

56055605
'outer_loop: for (incoming_scid, update_add_htlcs) in decode_update_add_htlcs {
5606-
let incoming_channel_details_opt = self.do_funded_channel_callback(incoming_scid, |chan: &mut Channel<SP>| {
5606+
let incoming_channel_details_opt = self.do_funded_channel_callback(incoming_scid, |chan: &mut FundedChannel<SP>| {
56075607
let counterparty_node_id = chan.context.get_counterparty_node_id();
56085608
let channel_id = chan.context.channel_id();
56095609
let funding_txo = chan.context.get_funding_txo().unwrap();
@@ -5638,7 +5638,7 @@ where
56385638
let outgoing_scid_opt = next_packet_details_opt.as_ref().map(|d| d.outgoing_scid);
56395639

56405640
// Process the HTLC on the incoming channel.
5641-
match self.do_funded_channel_callback(incoming_scid, |chan: &mut Channel<SP>| {
5641+
match self.do_funded_channel_callback(incoming_scid, |chan: &mut FundedChannel<SP>| {
56425642
let logger = WithChannelContext::from(&self.logger, &chan.context, Some(update_add_htlc.payment_hash));
56435643
chan.can_accept_incoming_htlc(
56445644
update_add_htlc, &self.fee_estimator, &logger,
@@ -6338,7 +6338,7 @@ where
63386338
let _ = self.process_background_events();
63396339
}
63406340

6341-
fn update_channel_fee(&self, chan_id: &ChannelId, chan: &mut Channel<SP>, new_feerate: u32) -> NotifyOption {
6341+
fn update_channel_fee(&self, chan_id: &ChannelId, chan: &mut FundedChannel<SP>, new_feerate: u32) -> NotifyOption {
63426342
if !chan.context.is_outbound() { return NotifyOption::SkipPersistNoEvents; }
63436343

63446344
let logger = WithChannelContext::from(&self.logger, &chan.context, None);
@@ -7437,7 +7437,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
74377437
/// Handles a channel reentering a functional state, either due to reconnect or a monitor
74387438
/// update completion.
74397439
fn handle_channel_resumption(&self, pending_msg_events: &mut Vec<MessageSendEvent>,
7440-
channel: &mut Channel<SP>, raa: Option<msgs::RevokeAndACK>,
7440+
channel: &mut FundedChannel<SP>, raa: Option<msgs::RevokeAndACK>,
74417441
commitment_update: Option<msgs::CommitmentUpdate>, order: RAACommitmentOrder,
74427442
pending_forwards: Vec<(PendingHTLCInfo, u64)>, pending_update_adds: Vec<msgs::UpdateAddHTLC>,
74437443
funding_broadcastable: Option<Transaction>,
@@ -10946,7 +10946,7 @@ where
1094610946
/// Calls a function which handles an on-chain event (blocks dis/connected, transactions
1094710947
/// un/confirmed, etc) on each channel, handling any resulting errors or messages generated by
1094810948
/// the function.
10949-
fn do_chain_event<FN: Fn(&mut Channel<SP>) -> Result<(Option<msgs::ChannelReady>, Vec<(HTLCSource, PaymentHash)>, Option<msgs::AnnouncementSignatures>), ClosureReason>>
10949+
fn do_chain_event<FN: Fn(&mut FundedChannel<SP>) -> Result<(Option<msgs::ChannelReady>, Vec<(HTLCSource, PaymentHash)>, Option<msgs::AnnouncementSignatures>), ClosureReason>>
1095010950
(&self, height_opt: Option<u32>, f: FN) {
1095110951
// Note that we MUST NOT end up calling methods on self.chain_monitor here - we're called
1095210952
// during initialization prior to the chain_monitor being fully configured in some cases.
@@ -13155,7 +13155,7 @@ where
1315513155
let mut close_background_events = Vec::new();
1315613156
let mut funding_txo_to_channel_id = hash_map_with_capacity(channel_count as usize);
1315713157
for _ in 0..channel_count {
13158-
let mut channel: Channel<SP> = Channel::read(reader, (
13158+
let mut channel: FundedChannel<SP> = FundedChannel::read(reader, (
1315913159
&args.entropy_source, &args.signer_provider, best_block_height, &provided_channel_type_features(&args.default_config)
1316013160
))?;
1316113161
let logger = WithChannelContext::from(&args.logger, &channel.context, None);

0 commit comments

Comments
 (0)