X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Finvoice_error.rs;h=122049b9295438b0147224a76c6efbc75455146c;hb=83f0dbc0021335dce183450d7dce7e9f284ff0b6;hp=e843264b4e3ed851afc5642fc1e8b5d0869854e5;hpb=0d3adb8fa08474b6d893a373b78e0195d061cfe6;p=rust-lightning diff --git a/lightning/src/offers/invoice_error.rs b/lightning/src/offers/invoice_error.rs index e843264b..122049b9 100644 --- a/lightning/src/offers/invoice_error.rs +++ b/lightning/src/offers/invoice_error.rs @@ -11,33 +11,33 @@ use crate::io; use crate::ln::msgs::DecodeError; -use crate::offers::parse::SemanticError; +use crate::offers::parse::Bolt12SemanticError; use crate::util::ser::{HighZeroBytesDroppedBigSize, Readable, WithoutLength, Writeable, Writer}; use crate::util::string::UntrustedString; use crate::prelude::*; -/// An error in response to an [`InvoiceRequest`] or an [`Invoice`]. +/// An error in response to an [`InvoiceRequest`] or an [`Bolt12Invoice`]. /// /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest -/// [`Invoice`]: crate::offers::invoice::Invoice +/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice #[derive(Clone, Debug)] #[cfg_attr(test, derive(PartialEq))] pub struct InvoiceError { - /// The field in the [`InvoiceRequest`] or the [`Invoice`] that contained an error. + /// The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error. /// /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest - /// [`Invoice`]: crate::offers::invoice::Invoice + /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice pub erroneous_field: Option, /// An explanation of the error. pub message: UntrustedString, } -/// The field in the [`InvoiceRequest`] or the [`Invoice`] that contained an error. +/// The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error. /// /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest -/// [`Invoice`]: crate::offers::invoice::Invoice +/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice #[derive(Clone, Debug)] #[cfg_attr(test, derive(PartialEq))] pub struct ErroneousField { @@ -93,8 +93,8 @@ impl Readable for InvoiceError { } } -impl From for InvoiceError { - fn from(error: SemanticError) -> Self { +impl From for InvoiceError { + fn from(error: Bolt12SemanticError) -> Self { InvoiceError { erroneous_field: None, message: UntrustedString(format!("{:?}", error)),