Skip to main content

dpp/errors/consensus/fee/
fee_error.rs

1use crate::errors::consensus::fee::balance_is_not_enough_error::BalanceIsNotEnoughError;
2use crate::errors::consensus::ConsensusError;
3use bincode::{Decode, DecodeUntrusted, Encode};
4use thiserror::Error;
5
6use crate::errors::ProtocolError;
7use platform_serialization_derive::{
8    PlatformDeserializeTrusted, PlatformDeserializeUntrusted, PlatformSerialize,
9};
10
11#[derive(
12    Error,
13    Debug,
14    PartialEq,
15    Encode,
16    Decode,
17    PlatformSerialize,
18    PlatformDeserializeTrusted,
19    PlatformDeserializeUntrusted,
20    Clone,
21    DecodeUntrusted,
22)]
23pub enum FeeError {
24    /*
25
26    DO NOT CHANGE ORDER OF VARIANTS WITHOUT INTRODUCING OF NEW VERSION
27
28    */
29    #[error(transparent)]
30    BalanceIsNotEnoughError(BalanceIsNotEnoughError),
31}
32
33impl From<FeeError> for ConsensusError {
34    fn from(error: FeeError) -> Self {
35        Self::FeeError(error)
36    }
37}