pub enum RejectedReason<N>where
N: Network,{
DuplicateProgramID(ProgramID<N>),
Finalize {
program_id: ProgramID<N>,
edition: u16,
resource: Identifier<N>,
index: usize,
command: Box<Command<N>>,
},
VM(Option<(ProgramID<N>, u16)>, Option<Identifier<N>>),
}Expand description
The reason a transaction was rejected.
Variants§
DuplicateProgramID(ProgramID<N>)
The transaction was rejected due to a duplicate program ID deployment in the same block.
Finalize
The transaction was rejected due to a failed finalize command. (program ID, edition, resource, index, command). Note: We do not log the actual error message from the finalize command, as it may contain sensitive information or lead to DOS vectors by storing string representations of large structs.
Fields
resource: Identifier<N>VM(Option<(ProgramID<N>, u16)>, Option<Identifier<N>>)
The transaction was rejected due to a VM error not captured by a finalize command. The programID and resource are logged if they are available.
Implementations§
Source§impl<N> RejectedReason<N>where
N: Network,
impl<N> RejectedReason<N>where
N: Network,
Sourcepub fn from_indexed_finalize_error<C>(
error: IndexedFinalizeError<N, C>,
) -> RejectedReason<N>where
C: ToString,
pub fn from_indexed_finalize_error<C>(
error: IndexedFinalizeError<N, C>,
) -> RejectedReason<N>where
C: ToString,
Initializes the rejected reason from an indexed finalize error.
C may be any type whose Display output is a valid Command<N> string (e.g. Command<N>
itself or String). If the command string cannot be re-parsed, the reason falls back to
VM so that a bad string never causes a panic in consensus code.
Trait Implementations§
Source§impl<N> Clone for RejectedReason<N>
impl<N> Clone for RejectedReason<N>
Source§fn clone(&self) -> RejectedReason<N>
fn clone(&self) -> RejectedReason<N>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<N> Debug for RejectedReason<N>where
N: Network,
impl<N> Debug for RejectedReason<N>where
N: Network,
Source§impl<'de, N> Deserialize<'de> for RejectedReason<N>where
N: Network,
impl<'de, N> Deserialize<'de> for RejectedReason<N>where
N: Network,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RejectedReason<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RejectedReason<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the rejected reason from a string or bytes.
Source§impl<N> Display for RejectedReason<N>where
N: Network,
impl<N> Display for RejectedReason<N>where
N: Network,
Source§impl<N> FromBytes for RejectedReason<N>where
N: Network,
impl<N> FromBytes for RejectedReason<N>where
N: Network,
Source§fn read_le<R>(reader: R) -> Result<RejectedReason<N>, Error>where
R: Read,
fn read_le<R>(reader: R) -> Result<RejectedReason<N>, Error>where
R: Read,
Reads the rejected reason from a buffer.
Source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N> FromStr for RejectedReason<N>where
N: Network,
impl<N> FromStr for RejectedReason<N>where
N: Network,
Source§impl<N> PartialEq for RejectedReason<N>
impl<N> PartialEq for RejectedReason<N>
Source§fn eq(&self, other: &RejectedReason<N>) -> bool
fn eq(&self, other: &RejectedReason<N>) -> bool
self and other values to be equal, and is used by ==.Source§impl<N> Serialize for RejectedReason<N>where
N: Network,
impl<N> Serialize for RejectedReason<N>where
N: Network,
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the rejected reason into string or bytes.
Source§impl<N> ToBytes for RejectedReason<N>where
N: Network,
impl<N> ToBytes for RejectedReason<N>where
N: Network,
impl<N> Eq for RejectedReason<N>
impl<N> StructuralPartialEq for RejectedReason<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for RejectedReason<N>
impl<N> RefUnwindSafe for RejectedReason<N>where
<N as Environment>::Field: RefUnwindSafe,
N: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for RejectedReason<N>
impl<N> Sync for RejectedReason<N>
impl<N> Unpin for RejectedReason<N>
impl<N> UnsafeUnpin for RejectedReason<N>
impl<N> UnwindSafe for RejectedReason<N>where
<N as Environment>::Field: UnwindSafe,
N: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
fn take_from_value<D>(
value: &mut Value,
field: &str,
) -> Result<T, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more