use explicit RoutingFlag type in error
This commit is contained in:
parent
a0154853b8
commit
6fa207167c
@ -1,3 +1,5 @@
|
|||||||
|
use sphinx_packet::header::routing::RoutingFlag;
|
||||||
|
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[error("Sphinx packet error: {0}")]
|
#[error("Sphinx packet error: {0}")]
|
||||||
@ -5,7 +7,7 @@ pub enum Error {
|
|||||||
#[error("Invalid packet bytes")]
|
#[error("Invalid packet bytes")]
|
||||||
InvalidPacketBytes,
|
InvalidPacketBytes,
|
||||||
#[error("Invalid routing flag: {0}")]
|
#[error("Invalid routing flag: {0}")]
|
||||||
InvalidRoutingFlag(u8),
|
InvalidRoutingFlag(RoutingFlag),
|
||||||
#[error("Invalid routing length: {0} bytes")]
|
#[error("Invalid routing length: {0} bytes")]
|
||||||
InvalidEncryptedRoutingInfoLength(usize),
|
InvalidEncryptedRoutingInfoLength(usize),
|
||||||
#[error("ConsistentLengthLayeredEncryptionError: {0}")]
|
#[error("ConsistentLengthLayeredEncryptionError: {0}")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user