mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
impl Borrow<[u8]>
for ChannelId
We do this for `Payment*` in `lightning-types` and its needed for the `hex_conservaitve` `impl_fmt_traits` macro which we'll use in the next commit.
This commit is contained in:
parent
eba329cfaf
commit
91a60c8256
2 changed files with 8 additions and 1 deletions
|
@ -7135,7 +7135,7 @@ where
|
|||
chan
|
||||
} else {
|
||||
let update_actions = peer_state.monitor_update_blocked_actions
|
||||
.remove(&channel_id).unwrap_or(Vec::new());
|
||||
.remove(channel_id).unwrap_or(Vec::new());
|
||||
mem::drop(peer_state_lock);
|
||||
mem::drop(per_peer_state);
|
||||
self.handle_monitor_update_completion_actions(update_actions);
|
||||
|
|
|
@ -30,6 +30,7 @@ use bitcoin::hashes::{
|
|||
HashEngine as _,
|
||||
sha256::Hash as Sha256,
|
||||
};
|
||||
use core::borrow::Borrow;
|
||||
use core::fmt;
|
||||
use core::ops::Deref;
|
||||
|
||||
|
@ -127,6 +128,12 @@ impl fmt::Display for ChannelId {
|
|||
}
|
||||
}
|
||||
|
||||
impl Borrow<[u8]> for ChannelId {
|
||||
fn borrow(&self) -> &[u8] {
|
||||
&self.0[..]
|
||||
}
|
||||
}
|
||||
|
||||
pub use lightning_types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Reference in a new issue