From a6e506a8b6e15b937b7e919a7feb6cc1975896b2 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Sun, 15 Dec 2024 21:16:50 -0500 Subject: [PATCH] fixes --- consensus/rules/src/blocks.rs | 4 ++-- tests/monero-serai/Cargo.toml | 1 - tests/monero-serai/src/rpc.rs | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/consensus/rules/src/blocks.rs b/consensus/rules/src/blocks.rs index 3ae64f6..5e55ce2 100644 --- a/consensus/rules/src/blocks.rs +++ b/consensus/rules/src/blocks.rs @@ -60,10 +60,10 @@ pub const fn is_randomx_seed_height(height: usize) -> bool { /// /// ref: pub const fn randomx_seed_height(height: usize) -> usize { - if height <= 2048 + 64 { + if height <= RX_SEEDHASH_EPOCH_BLOCKS + RX_SEEDHASH_EPOCH_LAG { 0 } else { - (height - 64 - 1) & !(2048 - 1) + (height - RX_SEEDHASH_EPOCH_LAG - 1) & !(RX_SEEDHASH_EPOCH_BLOCKS - 1) } } diff --git a/tests/monero-serai/Cargo.toml b/tests/monero-serai/Cargo.toml index 54c8a41..0088e32 100644 --- a/tests/monero-serai/Cargo.toml +++ b/tests/monero-serai/Cargo.toml @@ -11,7 +11,6 @@ serde_json = { workspace = true, features = ["std"] } tokio = { workspace = true, features = ["full"] } reqwest = { workspace = true, features = ["json"] } rayon = { workspace = true } -# rand = { workspace = true, features = ["std", "std_rng"] } futures = { workspace = true, features = ["std"] } [lints] diff --git a/tests/monero-serai/src/rpc.rs b/tests/monero-serai/src/rpc.rs index ef21319..62774bb 100644 --- a/tests/monero-serai/src/rpc.rs +++ b/tests/monero-serai/src/rpc.rs @@ -179,7 +179,6 @@ impl RpcClient { let task = tokio::task::spawn(self.client.get(&self.json_rpc_url).json(&request).send()); - // tokio::task::spawn(self.client.get(&*self.nodes.rand()).json(&request).send()); (height, task) });