From 1f55abcb323f1286bf79672b2fb1dc2f7a058734 Mon Sep 17 00:00:00 2001 From: Yuri Albuquerque Date: Thu, 29 Aug 2019 12:15:30 -0300 Subject: [PATCH] Ignoring the slow test_swap_dataset test. --- src/lib.rs | 1 + src/types.rs | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index dcdcee0..7ae0dff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,6 +84,7 @@ mod test { } #[test] + #[ignore] fn test_swap_dataset() { let hashs = vec![ U256::from_dec_str( diff --git a/src/types.rs b/src/types.rs index 10d3595..ae6483d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -229,13 +229,7 @@ impl RxState { 0 }; - let mut vm = unsafe { - randomx_create_vm( - flags, - cache.cache, - dataset, - ) - }; + let mut vm = unsafe { randomx_create_vm(flags, cache.cache, dataset) }; if vm.is_null() { vm = unsafe { @@ -263,8 +257,12 @@ impl RxState { for vm in &self.vms { let mut vm_lock = vm.write().unwrap(); unsafe { - self.cache.as_ref().map(|x| randomx_vm_set_cache(vm_lock.vm, x.cache)); - self.dataset.as_ref().map(|x| randomx_vm_set_dataset(vm_lock.vm, x.dataset)); + self.cache + .as_ref() + .map(|x| randomx_vm_set_cache(vm_lock.vm, x.cache)); + self.dataset + .as_ref() + .map(|x| randomx_vm_set_dataset(vm_lock.vm, x.dataset)); } }