From 1afe3e4dc86f324604d44e26a11670b8d8b605b0 Mon Sep 17 00:00:00 2001 From: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com> Date: Wed, 10 Jan 2024 01:49:35 +0000 Subject: [PATCH] fix builds on certain archs --- consensus/src/bin/scan_chain.rs | 5 +++-- cryptonight/build.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/consensus/src/bin/scan_chain.rs b/consensus/src/bin/scan_chain.rs index ed8933b5..95f0df05 100644 --- a/consensus/src/bin/scan_chain.rs +++ b/consensus/src/bin/scan_chain.rs @@ -36,7 +36,7 @@ use monero_consensus::{blocks::randomx_seed_height, HardFork}; mod tx_pool; -const MAX_BLOCKS_IN_RANGE: u64 = 1000; +const MAX_BLOCKS_IN_RANGE: u64 = 500; const BATCHES_IN_REQUEST: u64 = 3; const MAX_BLOCKS_HEADERS_IN_RANGE: u64 = 1000; @@ -226,7 +226,8 @@ where tokio::spawn(async move { while let Some(blocks) = incoming_blocks.next().await { - if blocks.last().unwrap().header.major_version >= 12 { + // RX technically starts at hf 12 but we do 11 so the seed hash is in the cache. + if blocks.last().unwrap().header.major_version >= 11 { let unwrapped_rx_vms = randomx_vms.as_mut().unwrap(); let blocks = rayon_spawn_async(move || { diff --git a/cryptonight/build.rs b/cryptonight/build.rs index 6551aa8b..bace0d82 100644 --- a/cryptonight/build.rs +++ b/cryptonight/build.rs @@ -21,13 +21,14 @@ fn main() { .file("c/skein.c") .file("c/slow-hash.c") .file("c/CryptonightR_JIT.c") - .file("c/CryptonightR_template.S") .flag("-O3") .flag("-fexceptions"); let target = env::var("TARGET").unwrap(); if target.contains("x86_64") { - cfg.flag("-maes").flag("-msse2"); + cfg.file("c/CryptonightR_template.S") + .flag("-maes") + .flag("-msse2"); } cfg.compile("cryptonight")