Use upstream rocksdb (#11248)
* Use upstream rocksdb …by way of https://github.com/paritytech/parity-common/pull/257 by @ordian. * Hint at how `parity db reset` works in the error message * migration-rocksdb: fix build * Cargo.toml: use git dependency instead of path * update to latest kvdb-rocksdb * fix tests * saner default for light client * rename open_db to open_db_light * update to latest kvdb-rocksdb * moar update to latest kvdb-rocksdb * even moar update to latest kvdb-rocksdb * use kvdb-rocksdb from crates.io * Update parity/db/rocksdb/helpers.rs * add docs to memory_budget division
This commit is contained in:
@@ -1297,9 +1297,9 @@ impl DatabaseRestore for Client {
|
||||
impl BlockChainReset for Client {
|
||||
fn reset(&self, num: u32) -> Result<(), String> {
|
||||
if num as u64 > self.pruning_history() {
|
||||
return Err("Attempting to reset to block with pruned state".into())
|
||||
return Err(format!("Attempting to reset the chain {} blocks back failed: state is pruned (max available: {})", num, self.pruning_history()).into())
|
||||
} else if num == 0 {
|
||||
return Err("invalid number of blocks to reset".into())
|
||||
return Err("0 is an invalid number of blocks to reset".into())
|
||||
}
|
||||
|
||||
let mut blocks_to_delete = Vec::with_capacity(num as usize);
|
||||
|
||||
Reference in New Issue
Block a user