Struct diem_types::transaction::TransactionListWithProof [−][src]
pub struct TransactionListWithProof<T> {
pub transactions: Vec<Transaction>,
pub events: Option<Vec<Vec<ContractEvent>>>,
pub first_transaction_version: Option<Version>,
pub proof: TransactionInfoListWithProof<T>,
}
Fields
transactions: Vec<Transaction>
events: Option<Vec<Vec<ContractEvent>>>
first_transaction_version: Option<Version>
proof: TransactionInfoListWithProof<T>
Implementations
pub fn new(
transactions: Vec<Transaction>,
events: Option<Vec<Vec<ContractEvent>>>,
first_transaction_version: Option<Version>,
proof: TransactionInfoListWithProof<T>
) -> Self
pub fn new(
transactions: Vec<Transaction>,
events: Option<Vec<Vec<ContractEvent>>>,
first_transaction_version: Option<Version>,
proof: TransactionInfoListWithProof<T>
) -> Self
Constructor.
A convenience function to create an empty proof. Mostly used for tests.
Verifies the transaction list with proof using the given ledger_info
.
This method will ensure:
- All transactions exist on the given
ledger_info
. - All transactions in the list have consecutive versions.
- If
first_transaction_version
is None, the transaction list is empty. Otherwise, the transaction list starts atfirst_transaction_version
. - If events exist, they match the expected event root hashes in the proof.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for TransactionListWithProof<T> where
T: RefUnwindSafe,
impl<T> Send for TransactionListWithProof<T> where
T: Send,
impl<T> Sync for TransactionListWithProof<T> where
T: Sync,
impl<T> Unpin for TransactionListWithProof<T> where
T: Unpin,
impl<T> UnwindSafe for TransactionListWithProof<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Generates a hash used only for tests.