Skip to content

Commit

Permalink
Ignoring the slow test_swap_dataset test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denommus committed Aug 29, 2019
1 parent 8e13107 commit 1f55abc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ mod test {
}

#[test]
#[ignore]
fn test_swap_dataset() {
let hashs = vec![
U256::from_dec_str(
Expand Down
16 changes: 7 additions & 9 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 1f55abc

Please sign in to comment.