fix builds on certain archs

This commit is contained in:
Boog900 2024-01-10 01:49:35 +00:00
parent a30f418247
commit 1afe3e4dc8
No known key found for this signature in database
GPG key ID: 5401367FB7302004
2 changed files with 6 additions and 4 deletions

View file

@ -36,7 +36,7 @@ use monero_consensus::{blocks::randomx_seed_height, HardFork};
mod tx_pool; mod tx_pool;
const MAX_BLOCKS_IN_RANGE: u64 = 1000; const MAX_BLOCKS_IN_RANGE: u64 = 500;
const BATCHES_IN_REQUEST: u64 = 3; const BATCHES_IN_REQUEST: u64 = 3;
const MAX_BLOCKS_HEADERS_IN_RANGE: u64 = 1000; const MAX_BLOCKS_HEADERS_IN_RANGE: u64 = 1000;
@ -226,7 +226,8 @@ where
tokio::spawn(async move { tokio::spawn(async move {
while let Some(blocks) = incoming_blocks.next().await { 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 unwrapped_rx_vms = randomx_vms.as_mut().unwrap();
let blocks = rayon_spawn_async(move || { let blocks = rayon_spawn_async(move || {

View file

@ -21,13 +21,14 @@ fn main() {
.file("c/skein.c") .file("c/skein.c")
.file("c/slow-hash.c") .file("c/slow-hash.c")
.file("c/CryptonightR_JIT.c") .file("c/CryptonightR_JIT.c")
.file("c/CryptonightR_template.S")
.flag("-O3") .flag("-O3")
.flag("-fexceptions"); .flag("-fexceptions");
let target = env::var("TARGET").unwrap(); let target = env::var("TARGET").unwrap();
if target.contains("x86_64") { if target.contains("x86_64") {
cfg.flag("-maes").flag("-msse2"); cfg.file("c/CryptonightR_template.S")
.flag("-maes")
.flag("-msse2");
} }
cfg.compile("cryptonight") cfg.compile("cryptonight")