Skip to content

Commit

Permalink
Fix types.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Nov 1, 2023
1 parent e9ab926 commit b5c1684
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -128,7 +128,7 @@ pub struct UnprovenTransaction {
/// Fee setup for the transaction.
pub fee: Fee,
/// Crossover value for inter-contract calls.
pub crossover: Option<Crossover>,
pub crossover: Option<WasmCrossover>,
/// Call data payload for contract calls.
pub call: Option<CallData>,
}
Expand All @@ -144,7 +144,7 @@ impl UnprovenTransaction {
inputs: I,
outputs: O,
fee: Fee,
crossover: Option<WasmCrossover>,
crossover: Option<CrossoverType>,
call: Option<types::ExecuteCall>,
) -> Option<Self>
where
Expand Down Expand Up @@ -220,13 +220,13 @@ impl UnprovenTransaction {
});

let crossover = crossover.and_then(
|WasmCrossover {
|CrossoverType {
blinder,
crossover,
value,
}| {
Some({
Crossover {
WasmCrossover {
crossover: rkyv::from_bytes::<PhoenixCrossover>(
&crossover,
)
Expand Down

0 comments on commit b5c1684

Please sign in to comment.