Skip to content

Commit 304068d

Browse files
committed
f: Update the getters to not return an option vector
1 parent a0edd81 commit 304068d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channelmanager.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -926,13 +926,13 @@ impl ClaimablePayment {
926926
}
927927

928928
/// Returns the inbound `channel_id`s for all HTLCs associated with the payment.
929-
fn get_channel_ids(&self) -> Vec<Option<ChannelId>> {
930-
self.htlcs.iter().map(|htlc| Some(htlc.prev_hop.channel_id)).collect()
929+
fn get_channel_ids(&self) -> Vec<ChannelId> {
930+
self.htlcs.iter().map(|htlc| htlc.prev_hop.channel_id).collect()
931931
}
932932

933933
/// Returns the inbound `user_channel_id`s for all HTLCs associated with the payment.
934-
fn get_user_channel_ids(&self) -> Vec<Option<u128>> {
935-
self.htlcs.iter().map(|htlc| htlc.prev_hop.user_channel_id).collect()
934+
fn get_user_channel_ids(&self) -> Vec<u128> {
935+
self.htlcs.iter().map(|htlc| htlc.prev_hop.user_channel_id.unwrap_or(0)).collect()
936936
}
937937
}
938938

0 commit comments

Comments
 (0)