X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fmsgs.rs;h=4cff6256f83f9176460d80f23044d93036114b7a;hb=608cf1c89db01f9cf612516a88a3f77f1f48bc52;hp=354376649c7b69ed79304ff51e872fb6d68d88df;hpb=2be7c5debe6483b5f6f70dcd25c9c266550b3888;p=rust-lightning diff --git a/src/ln/msgs.rs b/src/ln/msgs.rs index 35437664..4cff6256 100644 --- a/src/ln/msgs.rs +++ b/src/ln/msgs.rs @@ -29,6 +29,8 @@ use std::result::Result; use util::{byte_utils, events}; use util::ser::{Readable, Writeable, Writer}; +use ln::channelmanager::{PaymentPreimage, PaymentHash}; + /// An error in decoding a message or struct. #[derive(Debug)] pub enum DecodeError { @@ -256,7 +258,7 @@ pub struct UpdateAddHTLC { pub(crate) channel_id: [u8; 32], pub(crate) htlc_id: u64, pub(crate) amount_msat: u64, - pub(crate) payment_hash: [u8; 32], + pub(crate) payment_hash: PaymentHash, pub(crate) cltv_expiry: u32, pub(crate) onion_routing_packet: OnionPacket, } @@ -266,7 +268,7 @@ pub struct UpdateAddHTLC { pub struct UpdateFulfillHTLC { pub(crate) channel_id: [u8; 32], pub(crate) htlc_id: u64, - pub(crate) payment_preimage: [u8; 32], + pub(crate) payment_preimage: PaymentPreimage, } /// An update_fail_htlc message to be sent or received from a peer