X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Fparse.rs;h=c48d745a9ffd365ecf09800bc6b6bd24d6e988b5;hb=e3dea2c3c7099c63d569b8912b9633aa733be19a;hp=72c4c380d52592f8c87b59c9f50653a449fec0b9;hpb=dfb250b976eb9ad9e93f0c3f543ad88b76924d42;p=rust-lightning diff --git a/lightning/src/offers/parse.rs b/lightning/src/offers/parse.rs index 72c4c380..c48d745a 100644 --- a/lightning/src/offers/parse.rs +++ b/lightning/src/offers/parse.rs @@ -9,7 +9,6 @@ //! Parsing and formatting for bech32 message encoding. -use bitcoin::bech32; use bitcoin::secp256k1; use crate::io; use crate::ln::msgs::DecodeError; @@ -25,8 +24,7 @@ pub(super) use sealed::Bech32Encode; pub use sealed::Bech32Encode; mod sealed { - use bitcoin::bech32; - use bitcoin::bech32::{FromBase32, ToBase32}; + use bech32::{FromBase32, ToBase32}; use core::fmt; use super::Bolt12ParseError; @@ -183,12 +181,16 @@ 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. MissingCreationTime, /// An invoice payment hash was expected but was missing. MissingPaymentHash, + /// An invoice payment hash was provided but was not expected. + UnexpectedPaymentHash, /// A signature was expected but was missing. MissingSignature, } @@ -275,7 +277,6 @@ mod bolt12_tests { #[cfg(test)] mod tests { use super::Bolt12ParseError; - use bitcoin::bech32; use crate::ln::msgs::DecodeError; use crate::offers::offer::Offer;