diff --git a/util/src/hashdb.rs b/util/src/hashdb.rs index 395a504de..671b32ed5 100644 --- a/util/src/hashdb.rs +++ b/util/src/hashdb.rs @@ -17,10 +17,10 @@ //! Database of byte-slices keyed to their Keccak hash. use hash::*; use std::collections::HashMap; -use elastic_array::ElasticArray256; +use elastic_array::ElasticArray128; /// `HashDB` value type. -pub type DBValue = ElasticArray256; +pub type DBValue = ElasticArray128; /// Trait modelling datastore keyed by a 32-byte Keccak hash. pub trait HashDB: AsHashDB + Send + Sync { diff --git a/util/src/kvdb.rs b/util/src/kvdb.rs index d4d235fdc..8be22e0aa 100644 --- a/util/src/kvdb.rs +++ b/util/src/kvdb.rs @@ -464,6 +464,7 @@ impl Database { try!(db.write_opt(batch, &self.write_opts)); for column in self.flushing.write().iter_mut() { column.clear(); + column.shrink_to_fit(); } Ok(()) },