diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index 6df32abb4..89a7ad3a1 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -12,7 +12,12 @@ repository = "https://github.com/Chia-Network/chia_rs" workspace = true [features] -py-bindings = ["dep:pyo3", "dep:chia_py_streamable_macro"] +py-bindings = [ + "dep:pyo3", + "dep:chia_py_streamable_macro", + "chia-traits/py-bindings", + "chia-protocol/py-bindings" +] [dependencies] clvmr = { workspace = true } diff --git a/crates/chia-consensus/benches/run-generator.rs b/crates/chia-consensus/benches/run-generator.rs index 588f0e1c5..9ee010abf 100644 --- a/crates/chia-consensus/benches/run-generator.rs +++ b/crates/chia-consensus/benches/run-generator.rs @@ -1,5 +1,4 @@ use chia_consensus::consensus_constants::TEST_CONSTANTS; -use chia_consensus::gen::conditions::MempoolVisitor; use chia_consensus::gen::flags::ALLOW_BACKREFS; use chia_consensus::gen::run_block_generator::{run_block_generator, run_block_generator2}; use clvmr::serde::{node_from_bytes, node_to_bytes_backrefs}; diff --git a/crates/chia-consensus/src/gen/solution_generator.rs b/crates/chia-consensus/src/gen/solution_generator.rs index c153a903a..1287bb42d 100644 --- a/crates/chia-consensus/src/gen/solution_generator.rs +++ b/crates/chia-consensus/src/gen/solution_generator.rs @@ -453,24 +453,24 @@ mod tests { #[case(0x7fff)] #[case(0x8000)] #[case(0xffff)] - #[case(0x7fffff)] - #[case(0x800000)] - #[case(0xffffff)] - #[case(0x7fffffff)] - #[case(0x80000000)] - #[case(0xffffffff)] - #[case(0x7fffffffff)] - #[case(0x8000000000)] - #[case(0xffffffffff)] - #[case(0x7fffffffffff)] - #[case(0x800000000000)] - #[case(0xffffffffffff)] - #[case(0x7fffffffffffff)] - #[case(0x80000000000000)] - #[case(0xffffffffffffff)] - #[case(0x7fffffffffffffff)] - #[case(0x8000000000000000)] - #[case(0xffffffffffffffff)] + #[case(0x7f_ffff)] + #[case(0x80_0000)] + #[case(0xff_ffff)] + #[case(0x7fff_ffff)] + #[case(0x8000_0000)] + #[case(0xffff_ffff)] + #[case(0x7f_ffff_ffff)] + #[case(0x80_0000_0000)] + #[case(0xff_ffff_ffff)] + #[case(0x7fff_ffff_ffff)] + #[case(0x8000_0000_0000)] + #[case(0xffff_ffff_ffff)] + #[case(0x7f_ffff_ffff_ffff)] + #[case(0x80_0000_0000_0000)] + #[case(0xff_ffff_ffff_ffff)] + #[case(0x7fff_ffff_ffff_ffff)] + #[case(0x8000_0000_0000_0000)] + #[case(0xffff_ffff_ffff_ffff)] #[case(0x7)] #[case(0x8)] #[case(0xf)] @@ -480,21 +480,21 @@ mod tests { #[case(0x7ffff)] #[case(0x80000)] #[case(0xfffff)] - #[case(0x7ffffff)] - #[case(0x8000000)] - #[case(0xfffffff)] - #[case(0x7ffffffff)] - #[case(0x800000000)] - #[case(0xfffffffff)] - #[case(0x7ffffffffff)] - #[case(0x80000000000)] - #[case(0xfffffffffff)] - #[case(0x7ffffffffffff)] - #[case(0x8000000000000)] - #[case(0xfffffffffffff)] - #[case(0x7ffffffffffffff)] - #[case(0x800000000000000)] - #[case(0xfffffffffffffff)] + #[case(0x7ff_ffff)] + #[case(0x800_0000)] + #[case(0xfff_ffff)] + #[case(0x7_ffff_ffff)] + #[case(0x8_0000_0000)] + #[case(0xf_ffff_ffff)] + #[case(0x7ff_ffff_ffff)] + #[case(0x800_0000_0000)] + #[case(0xfff_ffff_ffff)] + #[case(0x7_ffff_ffff_ffff)] + #[case(0x8_0000_0000_0000)] + #[case(0xf_ffff_ffff_ffff)] + #[case(0x7ff_ffff_ffff_ffff)] + #[case(0x800_0000_0000_0000)] + #[case(0xfff_ffff_ffff_ffff)] fn test_clvm_bytes_len(#[case] n: u64) { let len = clvm_bytes_len(n); let mut a = Allocator::new();