diff --git a/taiga_halo2/Cargo.toml b/taiga_halo2/Cargo.toml index 9aac844c..434f12a2 100644 --- a/taiga_halo2/Cargo.toml +++ b/taiga_halo2/Cargo.toml @@ -23,7 +23,7 @@ num-bigint = "0.4" rustler = { version = "0.29.1", optional = true } serde = { version = "1.0", features = ["derive"], optional = true } -borsh = { version = "1.0.0-alpha.3", features = ["derive"], optional = true } +borsh = { version = "= 1.0.0-alpha.3", features = ["derive"], optional = true } [dev-dependencies] criterion = "0.5" @@ -46,6 +46,6 @@ name = "tx_examples" [features] default = [] -nif = ["dep:rustler", "pasta_curves/repr-erlang"] +nif = ["dep:rustler", "borsh", "pasta_curves/repr-erlang"] serde = ["dep:serde", "pasta_curves/serde"] borsh = ["dep:borsh"] diff --git a/taiga_halo2/src/transaction.rs b/taiga_halo2/src/transaction.rs index 2ea263e4..e24058fd 100644 --- a/taiga_halo2/src/transaction.rs +++ b/taiga_halo2/src/transaction.rs @@ -403,8 +403,7 @@ pub mod testing { #[test] fn test_halo2_transaction() { - use super::Transaction; - use borsh::{BorshDeserialize, BorshSerialize}; + use super::*; use rand::rngs::OsRng; let rng = OsRng; @@ -418,14 +417,14 @@ pub mod testing { transparent_ptx_bundle, r_vec, ); - let (shielded_ret, _) = tx.execute().unwrap(); + let (_shielded_ret, _) = tx.execute().unwrap(); #[cfg(feature = "borsh")] { let borsh = tx.try_to_vec().unwrap(); let de_tx: Transaction = BorshDeserialize::deserialize(&mut borsh.as_ref()).unwrap(); let (de_shielded_ret, _) = de_tx.execute().unwrap(); - assert_eq!(shielded_ret, de_shielded_ret); + assert_eq!(_shielded_ret, de_shielded_ret); } } }