X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Fparse.rs;h=472e44f6220f1aed6b2c77c71252a49a1b7aff3b;hb=a8bd4c097f7ae6620eee66c1cb49144e38568439;hp=00c48d9eae78aac83adc2dc416d18817b3a98ff1;hpb=cd327089a8c719844b776601e9ccd0728777ac28;p=rust-lightning diff --git a/lightning/src/offers/parse.rs b/lightning/src/offers/parse.rs index 00c48d9e..472e44f6 100644 --- a/lightning/src/offers/parse.rs +++ b/lightning/src/offers/parse.rs @@ -9,9 +9,7 @@ //! Parsing and formatting for bech32 message encoding. -use bitcoin::bech32; use bitcoin::secp256k1; -use core::convert::TryFrom; use crate::io; use crate::ln::msgs::DecodeError; use crate::util::ser::SeekReadable; @@ -26,9 +24,7 @@ pub(super) use sealed::Bech32Encode; pub use sealed::Bech32Encode; mod sealed { - use bitcoin::bech32; - use bitcoin::bech32::{FromBase32, ToBase32}; - use core::convert::TryFrom; + use bech32::{FromBase32, ToBase32}; use core::fmt; use super::Bolt12ParseError; @@ -185,6 +181,8 @@ pub enum Bolt12SemanticError { DuplicatePaymentId, /// Blinded paths were expected but were missing. MissingPaths, + /// Blinded paths were provided but were not expected. + UnexpectedPaths, /// The blinded payinfo given does not match the number of blinded path hops. InvalidPayInfo, /// An invoice creation time was expected but was missing. @@ -277,7 +275,6 @@ mod bolt12_tests { #[cfg(test)] mod tests { use super::Bolt12ParseError; - use bitcoin::bech32; use crate::ln::msgs::DecodeError; use crate::offers::offer::Offer;