[][src]Enum plasma_cash_tokens::TxnCmp

pub enum TxnCmp {
    Same,
    Parent,
    Child,
    EarlierSibling,
    LaterSibling,
    DoubleSpend,
    Unrelated,
}

Different types of comparisions of Plasma Transactions.

Plasma Transactions form a DAG where only one pathway back to the origin is considered valid. However, there may be multiple pathways, so it is important to allow this behavior to be compared in order to understand which transaction is legitimate.

Note

This comparision is used in the history verification logic, as well as withdrawal challenge detection logic. Different clients may have a privledged view of this ordering, since transactions may be encrypted in some context and unencrypted in others, which means relationships may differ depending on information privledge of the client.

Variants

Same

LHS & RHS are the same exact transaction

Parent

LHS is the parent of RHS

Child

RHS is the parent of LHS

EarlierSibling

LHS & RHS have same parent, but LHS is earlier

LaterSibling

LHS & RHS have same parent, but RHS is earlier

DoubleSpend

LHS & RHS are the same txn to two different receivers

Unrelated

LHS & RHS have no relationship to each other

Trait Implementations

impl PartialEq<TxnCmp> for TxnCmp[src]

impl Debug for TxnCmp[src]

Auto Trait Implementations

impl Send for TxnCmp

impl Unpin for TxnCmp

impl Sync for TxnCmp

impl UnwindSafe for TxnCmp

impl RefUnwindSafe for TxnCmp

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]