feat(primitives): Add self-contained transaction struct (#107)

This commit is contained in:
Ch1n3du 2022-06-02 20:02:46 +01:00 committed by GitHub
parent 65a4468f46
commit f5b7c13c86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1438,6 +1438,18 @@ pub struct Block {
#[derive(Encode, Decode, Debug)]
pub struct BlockWrapper(#[n(0)] pub u16, #[n(1)] pub Block);
#[derive(Encode, Decode, Debug)]
pub struct Transaction {
#[n(0)]
transaction_body: TransactionBody,
#[n(1)]
transaction_witness_set: TransactionWitnessSet,
#[n(2)]
success: bool,
#[n(3)]
auxiliary_data: Option<AuxiliaryData>,
}
#[cfg(test)]
mod tests {
use super::BlockWrapper;