1
0
mirror of synced 2025-01-11 00:05:48 +00:00

use explicit RoutingFlag type in error

This commit is contained in:
Youngjoon Lee 2024-11-20 19:21:52 +09:00
parent a0154853b8
commit 6fa207167c
No known key found for this signature in database
GPG Key ID: 303963A54A81DD4D

View File

@ -1,3 +1,5 @@
use sphinx_packet::header::routing::RoutingFlag;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Sphinx packet error: {0}")]
@ -5,7 +7,7 @@ pub enum Error {
#[error("Invalid packet bytes")]
InvalidPacketBytes,
#[error("Invalid routing flag: {0}")]
InvalidRoutingFlag(u8),
InvalidRoutingFlag(RoutingFlag),
#[error("Invalid routing length: {0} bytes")]
InvalidEncryptedRoutingInfoLength(usize),
#[error("ConsistentLengthLayeredEncryptionError: {0}")]