More performance optimizations (#1649)
* Use tree index for DB * Set uncles_hash, tx_root, receipts_root from verified block * Use Filth instead of a bool * Fix empty root check * Flush block queue properly * Expunge deref
This commit is contained in:
committed by
Gav Wood
parent
459dcbcef1
commit
4e447ccc68
@@ -47,8 +47,7 @@ const PADDING : [u8; 10] = [ 0u8; 10 ];
|
||||
impl RefCountedDB {
|
||||
/// Create a new instance given a `backing` database.
|
||||
pub fn new(path: &str, config: DatabaseConfig) -> RefCountedDB {
|
||||
let opts = config.prefix(DB_PREFIX_LEN);
|
||||
let backing = Database::open(&opts, path).unwrap_or_else(|e| {
|
||||
let backing = Database::open(&config, path).unwrap_or_else(|e| {
|
||||
panic!("Error opening state db: {}", e);
|
||||
});
|
||||
if !backing.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user