pass correct header column to read_meta again (#827)

* pass correct header column to read_meta again

fixes #826

* make COLUMN_META exist in a single place

* pass COLUMN_META as arg for more consistency with other db utils

* remove unused import
This commit is contained in:
snd
2018-09-28 04:43:18 +09:00
committed by Gav Wood
parent 0d284c0195
commit 41a6f54c4a
3 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ impl<Block> LightStorage<Block>
{
/// Create new storage with given settings.
pub fn new(config: DatabaseSettings) -> ClientResult<Self> {
let db = open_database(&config, "light")?;
let db = open_database(&config, columns::META, "light")?;
Self::from_kvdb(db as Arc<_>)
}
@@ -92,7 +92,7 @@ impl<Block> LightStorage<Block>
columns::HEADER,
columns::AUTHORITIES
)?;
let meta = RwLock::new(read_meta::<Block>(&*db, columns::META)?);
let meta = RwLock::new(read_meta::<Block>(&*db, columns::META, columns::HEADER)?);
let leaves = RwLock::new(LeafSet::read_from_db(&*db, columns::META, meta_keys::LEAF_PREFIX)?);
Ok(LightStorage {