Skip to content

Commit 33eaf96

Browse files
nepetcdecker
authored andcommitted
trampoline: Rename ChannelData -> Channel
Signed-off-by: Peter Neuroth <[email protected]>
1 parent da48b65 commit 33eaf96

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

libs/gl-plugin/src/tramp.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub async fn trampolinepay(
192192

193193
debug!("overpay={}, total_amt={}", overpay, amount_msat);
194194

195-
let mut channels: Vec<ChannelData> = rpc
195+
let mut channels: Vec<Channel> = rpc
196196
.call_typed(&cln_rpc::model::requests::ListpeerchannelsRequest { id: Some(node_id) })
197197
.await?
198198
.channels
@@ -226,7 +226,7 @@ pub async fn trampolinepay(
226226
return None;
227227
}
228228
};
229-
return Some(ChannelData {
229+
return Some(Channel {
230230
short_channel_id,
231231
spendable_msat,
232232
min_htlc_out_msat,
@@ -448,11 +448,11 @@ async fn do_pay(
448448
}
449449

450450
async fn reestablished_channels(
451-
channels: Vec<ChannelData>,
451+
channels: Vec<Channel>,
452452
node_id: PublicKey,
453453
rpc_path: PathBuf,
454454
deadline: Instant,
455-
) -> Result<Vec<ChannelData>> {
455+
) -> Result<Vec<Channel>> {
456456
// Wait for channels to re-establish.
457457
crate::awaitables::assert_send(AwaitableChannel::new(
458458
node_id,
@@ -487,10 +487,11 @@ async fn reestablished_channels(
487487
Ok(_amount) => Some(channel_data),
488488
_ => None,
489489
})
490-
.collect::<Vec<ChannelData>>())
490+
.collect::<Vec<Channel>>())
491491
}
492492

493-
struct ChannelData {
493+
#[derive(Clone, Debug, PartialEq, Eq)]
494+
struct Channel {
494495
short_channel_id: cln_rpc::primitives::ShortChannelId,
495496
spendable_msat: u64,
496497
min_htlc_out_msat: u64,

0 commit comments

Comments
 (0)