Improve nonce-related error messages
This commit is contained in:
@ -4,6 +4,7 @@ use {
|
||||
account::{Account, ReadableAccount},
|
||||
account_utils::StateMut,
|
||||
commitment_config::CommitmentConfig,
|
||||
hash::Hash,
|
||||
nonce::{
|
||||
state::{Data, Versions},
|
||||
State,
|
||||
@ -21,10 +22,10 @@ pub enum Error {
|
||||
InvalidAccountData,
|
||||
#[error("unexpected account data size")]
|
||||
UnexpectedDataSize,
|
||||
#[error("query hash does not match stored hash")]
|
||||
InvalidHash,
|
||||
#[error("query authority does not match account authority")]
|
||||
InvalidAuthority,
|
||||
#[error("provided hash ({provided}) does not match nonce hash ({expected})")]
|
||||
InvalidHash { provided: Hash, expected: Hash },
|
||||
#[error("provided authority ({provided}) does not match nonce authority ({expected})")]
|
||||
InvalidAuthority { provided: Pubkey, expected: Pubkey },
|
||||
#[error("invalid state for requested operation")]
|
||||
InvalidStateForOperation,
|
||||
#[error("client error: {0}")]
|
||||
|
Reference in New Issue
Block a user