X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Futil%2Fser.rs;h=a2ef16b5e2462c51dd22f7c4444cd0cf7b22460a;hb=8470e60415eceecf9abcb518130f08bb06b91640;hp=c1d2802a76da834d03555cf73b0e2f88139d52a5;hpb=832fc4fd4435fa236f15d3e737bebf64619ff60e;p=rust-lightning diff --git a/src/util/ser.rs b/src/util/ser.rs index c1d2802a..a2ef16b5 100644 --- a/src/util/ser.rs +++ b/src/util/ser.rs @@ -6,10 +6,11 @@ use std::io::{Read, Write}; use std::collections::HashMap; use std::hash::Hash; -use secp256k1::{Secp256k1, Signature}; +use secp256k1::Signature; use secp256k1::key::{PublicKey, SecretKey}; -use bitcoin::util::hash::Sha256dHash; use bitcoin::blockdata::script::Script; +use bitcoin::blockdata::transaction::OutPoint; +use bitcoin_hashes::sha256d::Hash as Sha256dHash; use std::marker::Sized; use ln::msgs::DecodeError; use ln::channelmanager::{PaymentPreimage, PaymentHash}; @@ -203,6 +204,10 @@ macro_rules! impl_array { } //TODO: performance issue with [u8; size] with impl_array!() +impl_array!(3); // for rgb +impl_array!(4); // for IPv4 +impl_array!(10); // for OnionV2 +impl_array!(16); // for IPv6 impl_array!(32); // for channel id & hmac impl_array!(33); // for PublicKey impl_array!(64); // for Signature @@ -302,29 +307,6 @@ impl Readable for Script { } } -impl Writeable for Option