From d3fb27a5f1cd927e0b3d165f3c4ef3bbb5ab240c Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Sat, 27 Dec 2025 21:33:08 +0300 Subject: [PATCH] fix: break circular dependency between pezsp-crypto-hashing crates Removed pezsp-crypto-hashing-proc-macro from dev-dependencies of pezsp-crypto-hashing. The proc-macro integration tests are already in the proc-macro crate itself. --- .../primitives/crypto/hashing/Cargo.toml | 3 +- .../primitives/crypto/hashing/src/lib.rs | 42 +------------------ 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/bizinikiwi/primitives/crypto/hashing/Cargo.toml b/bizinikiwi/primitives/crypto/hashing/Cargo.toml index 1c9a2542..25b28c4e 100644 --- a/bizinikiwi/primitives/crypto/hashing/Cargo.toml +++ b/bizinikiwi/primitives/crypto/hashing/Cargo.toml @@ -32,7 +32,8 @@ twox-hash = { features = ["digest_0_10"], workspace = true } [dev-dependencies] criterion = { workspace = true, default-features = true } -pezsp-crypto-hashing-proc-macro = { workspace = true, default-features = true } +# Note: pezsp-crypto-hashing-proc-macro removed to break circular dependency +# The proc-macro tests are in its own crate [features] default = ["std"] diff --git a/bizinikiwi/primitives/crypto/hashing/src/lib.rs b/bizinikiwi/primitives/crypto/hashing/src/lib.rs index 34622815..823a0e1e 100644 --- a/bizinikiwi/primitives/crypto/hashing/src/lib.rs +++ b/bizinikiwi/primitives/crypto/hashing/src/lib.rs @@ -122,43 +122,5 @@ pub fn sha2_256(data: &[u8]) -> [u8; 32] { sha2::Sha256::digest(data).into() } -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn blake2b() { - assert_eq!(pezsp_crypto_hashing_proc_macro::blake2b_64!(b""), blake2_64(b"")[..]); - assert_eq!(pezsp_crypto_hashing_proc_macro::blake2b_256!(b"test"), blake2_256(b"test")[..]); - assert_eq!(pezsp_crypto_hashing_proc_macro::blake2b_512!(b""), blake2_512(b"")[..]); - } - - #[test] - fn keccak() { - assert_eq!(pezsp_crypto_hashing_proc_macro::keccak_256!(b"test"), keccak_256(b"test")[..]); - assert_eq!(pezsp_crypto_hashing_proc_macro::keccak_512!(b"test"), keccak_512(b"test")[..]); - } - - #[test] - fn sha2() { - assert_eq!(pezsp_crypto_hashing_proc_macro::sha2_256!(b"test"), sha2_256(b"test")[..]); - } - - #[test] - fn twox() { - assert_eq!(pezsp_crypto_hashing_proc_macro::twox_128!(b"test"), twox_128(b"test")[..]); - assert_eq!(pezsp_crypto_hashing_proc_macro::twox_64!(b""), twox_64(b"")[..]); - } - - #[test] - fn twox_concats() { - assert_eq!( - pezsp_crypto_hashing_proc_macro::twox_128!(b"test", b"123", b"45", b"", b"67890"), - twox_128(&b"test1234567890"[..]), - ); - assert_eq!( - pezsp_crypto_hashing_proc_macro::twox_128!(b"test", test, b"45", b"", b"67890"), - twox_128(&b"testtest4567890"[..]), - ); - } -} +// Note: Proc-macro integration tests moved to pezsp-crypto-hashing-proc-macro crate +// to break circular dependency