From b5c168410b797ac2a535c4428f1e0f72adecfcde Mon Sep 17 00:00:00 2001 From: Daksh Date: Wed, 1 Nov 2023 14:14:08 -0400 Subject: [PATCH] Fix types.rs --- src/tx.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tx.rs b/src/tx.rs index 97eb280..4079adb 100644 --- a/src/tx.rs +++ b/src/tx.rs @@ -24,7 +24,7 @@ use rkyv::{Archive, Deserialize, Serialize}; use rusk_abi::hash::Hasher; use rusk_abi::{ContractId, POSEIDON_TREE_DEPTH}; -use crate::{types, types::Crossover as WasmCrossover, utils}; +use crate::{types, types::CrossoverType, utils}; /// Chosen arity for the Notes tree implementation. pub const POSEIDON_TREE_ARITY: usize = 4; @@ -94,7 +94,7 @@ pub struct Output { /// A crossover to a transaction that is yet to be proven. #[derive(Debug, Clone, Archive, Serialize, Deserialize)] #[archive_attr(derive(CheckBytes))] -pub struct Crossover { +pub struct WasmCrossover { /// Crossover value to be used in inter-contract calls. pub crossover: PhoenixCrossover, /// Value of the crossover. @@ -128,7 +128,7 @@ pub struct UnprovenTransaction { /// Fee setup for the transaction. pub fee: Fee, /// Crossover value for inter-contract calls. - pub crossover: Option, + pub crossover: Option, /// Call data payload for contract calls. pub call: Option, } @@ -144,7 +144,7 @@ impl UnprovenTransaction { inputs: I, outputs: O, fee: Fee, - crossover: Option, + crossover: Option, call: Option, ) -> Option where @@ -220,13 +220,13 @@ impl UnprovenTransaction { }); let crossover = crossover.and_then( - |WasmCrossover { + |CrossoverType { blinder, crossover, value, }| { Some({ - Crossover { + WasmCrossover { crossover: rkyv::from_bytes::( &crossover, )