[][src]Struct solana_libra_types::transaction::TransactionListWithProof

pub struct TransactionListWithProof {
    pub transaction_and_infos: Vec<(SignedTransaction, TransactionInfo)>,
    pub events: Option<Vec<Vec<ContractEvent>>>,
    pub first_transaction_version: Option<Version>,
    pub proof_of_first_transaction: Option<AccumulatorProof>,
    pub proof_of_last_transaction: Option<AccumulatorProof>,
}

The list may have three states:

  1. The list is empty. Both proofs must be None.
  2. The list has only 1 transaction/transaction_info. Then proof_of_first_transaction must exist and proof_of_last_transaction must be None.
  3. The list has 2+ transactions/transaction_infos. The both proofs must exist.

Fields

transaction_and_infos: Vec<(SignedTransaction, TransactionInfo)>events: Option<Vec<Vec<ContractEvent>>>first_transaction_version: Option<Version>proof_of_first_transaction: Option<AccumulatorProof>proof_of_last_transaction: Option<AccumulatorProof>

Methods

impl TransactionListWithProof[src]

pub fn new(
    transaction_and_infos: Vec<(SignedTransaction, TransactionInfo)>,
    events: Option<Vec<Vec<ContractEvent>>>,
    first_transaction_version: Option<Version>,
    proof_of_first_transaction: Option<AccumulatorProof>,
    proof_of_last_transaction: Option<AccumulatorProof>
) -> Self
[src]

Constructor.

pub fn new_empty() -> Self[src]

Creates an empty transaction list.

pub fn verify(
    &self,
    ledger_info: &LedgerInfo,
    first_transaction_version: Option<Version>
) -> Result<()>
[src]

Verifies the transaction list with the proofs, both carried on self.

Two things are ensured if no error is raised:

  1. All the transactions exist on the ledger represented by ledger_info.
  2. And the transactions in the list has consecutive versions starting from first_transaction_version. When first_transaction_version is None, ensures the list is empty.

Trait Implementations

impl Clone for TransactionListWithProof[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<TransactionListWithProof> for TransactionListWithProof[src]

impl Eq for TransactionListWithProof[src]

impl Debug for TransactionListWithProof[src]

impl IntoProto for TransactionListWithProof[src]

type ProtoType = TransactionListWithProof

The corresponding Protobuf type.

impl FromProto for TransactionListWithProof[src]

type ProtoType = TransactionListWithProof

The corresponding Protobuf type.

impl Arbitrary for TransactionListWithProof[src]

type Parameters = ()

The type of parameters that [arbitrary_with] accepts for configuration of the generated [Strategy]. Parameters must implement [Default]. Read more

type Strategy = BoxedStrategy<Self>

The type of [Strategy] used to generate values of type Self. Read more

fn arbitrary() -> Self::Strategy[src]

Generates a [Strategy] for producing arbitrary values of type the implementing type (Self). Read more

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<P, T> IntoProtoBytes<P> for T where
    P: Message,
    T: IntoProto<ProtoType = P>, 

impl<P, T> FromProtoBytes<P> for T where
    P: Message,
    T: FromProto<ProtoType = P>, 

fn from_proto_bytes(bytes: &[u8]) -> Result<T, Error>

Decode a Rust struct from encoded Protobuf bytes.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]