|
|
|
@ -13,11 +13,11 @@ use core::fmt; |
|
|
|
|
use std::cmp::max; |
|
|
|
|
use std::collections::BTreeMap; |
|
|
|
|
use std::collections::HashSet; |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
use std::fs::create_dir_all; |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
use std::fs::{read, File, OpenOptions}; |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
use std::io::Write; |
|
|
|
|
use std::{collections::HashMap, sync::Arc}; |
|
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ use ng_net::{ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
use crate::commits::*; |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
use crate::rocksdb_user_storage::RocksDbUserStorage; |
|
|
|
|
use crate::types::*; |
|
|
|
|
use crate::user_storage::InMemoryUserStorage; |
|
|
|
@ -714,7 +714,7 @@ impl Verifier { |
|
|
|
|
} |
|
|
|
|
Ok(res) |
|
|
|
|
} |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
VerifierConfigType::RocksDb(path) => { |
|
|
|
|
let mut path = path.clone(); |
|
|
|
|
path.push(format!("outbox{}", self.peer_id.to_hash_string())); |
|
|
|
@ -794,7 +794,7 @@ impl Verifier { |
|
|
|
|
serde_bare::to_vec(&e)?, |
|
|
|
|
)?; |
|
|
|
|
} |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
VerifierConfigType::RocksDb(path) => { |
|
|
|
|
let mut path = path.clone(); |
|
|
|
|
std::fs::create_dir_all(path.clone()).unwrap(); |
|
|
|
@ -1968,7 +1968,7 @@ impl Verifier { |
|
|
|
|
let res = (js.last_seq_function)(self.peer_id, qty)?; |
|
|
|
|
self.max_reserved_seq_num = res + qty as u64; |
|
|
|
|
} |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
VerifierConfigType::RocksDb(path) => { |
|
|
|
|
let mut path = path.clone(); |
|
|
|
|
std::fs::create_dir_all(path.clone()).unwrap(); |
|
|
|
@ -2028,7 +2028,7 @@ impl Verifier { |
|
|
|
|
Some(Box::new(InMemoryUserStorage::new()) as Box<dyn UserStorage>), |
|
|
|
|
Some(block_storage), |
|
|
|
|
), |
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
|
#[cfg(all(not(target_family = "wasm"),not(docsrs)))] |
|
|
|
|
VerifierConfigType::RocksDb(path) => { |
|
|
|
|
let mut path_oxi = path.clone(); |
|
|
|
|
path_oxi.push("graph"); |
|
|
|
|