projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1956 from TheBlueMatt/2023-01-ser-cleanups
[rust-lightning]
/
lightning
/
src
/
offers
/
parse.rs
diff --git
a/lightning/src/offers/parse.rs
b/lightning/src/offers/parse.rs
index b9815b8117767938bee0ba544f1dd9df73db891f..deada66b05c2549ad29ca2b77459e6c6779b0346 100644
(file)
--- a/
lightning/src/offers/parse.rs
+++ b/
lightning/src/offers/parse.rs
@@
-123,20
+123,32
@@
pub enum ParseError {
/// Error when interpreting a TLV stream as a specific type.
#[derive(Debug, PartialEq)]
pub enum SemanticError {
/// Error when interpreting a TLV stream as a specific type.
#[derive(Debug, PartialEq)]
pub enum SemanticError {
+ /// The current [`std::time::SystemTime`] is past the offer or invoice's expiration.
+ AlreadyExpired,
/// The provided chain hash does not correspond to a supported chain.
UnsupportedChain,
/// The provided chain hash does not correspond to a supported chain.
UnsupportedChain,
+ /// A chain was provided but was not expected.
+ UnexpectedChain,
/// An amount was expected but was missing.
MissingAmount,
/// The amount exceeded the total bitcoin supply.
InvalidAmount,
/// An amount was provided but was not sufficient in value.
InsufficientAmount,
/// An amount was expected but was missing.
MissingAmount,
/// The amount exceeded the total bitcoin supply.
InvalidAmount,
/// An amount was provided but was not sufficient in value.
InsufficientAmount,
+ /// An amount was provided but was not expected.
+ UnexpectedAmount,
/// A currency was provided that is not supported.
UnsupportedCurrency,
/// A currency was provided that is not supported.
UnsupportedCurrency,
+ /// A feature was required but is unknown.
+ UnknownRequiredFeatures,
+ /// Features were provided but were not expected.
+ UnexpectedFeatures,
/// A required description was not provided.
MissingDescription,
/// A signing pubkey was not provided.
MissingSigningPubkey,
/// A required description was not provided.
MissingDescription,
/// A signing pubkey was not provided.
MissingSigningPubkey,
+ /// A signing pubkey was provided but was not expected.
+ UnexpectedSigningPubkey,
/// A quantity was expected but was missing.
MissingQuantity,
/// An unsupported quantity was provided.
/// A quantity was expected but was missing.
MissingQuantity,
/// An unsupported quantity was provided.
@@
-147,6
+159,8
@@
pub enum SemanticError {
MissingPayerMetadata,
/// A payer id was expected but was missing.
MissingPayerId,
MissingPayerMetadata,
/// A payer id was expected but was missing.
MissingPayerId,
+ /// A signature was expected but was missing.
+ MissingSignature,
}
impl From<bech32::Error> for ParseError {
}
impl From<bech32::Error> for ParseError {