mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
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:
@@ -113,7 +113,7 @@ pub fn new_client<E, S, Block>(
|
||||
}
|
||||
|
||||
mod columns {
|
||||
pub const META: Option<u32> = Some(0);
|
||||
pub const META: Option<u32> = ::utils::COLUMN_META;
|
||||
pub const STATE: Option<u32> = Some(1);
|
||||
pub const STATE_META: Option<u32> = Some(2);
|
||||
pub const HASH_LOOKUP: Option<u32> = Some(3);
|
||||
@@ -150,7 +150,7 @@ pub struct BlockchainDb<Block: BlockT> {
|
||||
|
||||
impl<Block: BlockT> BlockchainDb<Block> {
|
||||
fn new(db: Arc<KeyValueDB>) -> Result<Self, client::error::Error> {
|
||||
let meta = read_meta::<Block>(&*db, columns::META)?;
|
||||
let meta = read_meta::<Block>(&*db, columns::META, columns::HEADER)?;
|
||||
let leaves = LeafSet::read_from_db(&*db, columns::META, meta_keys::LEAF_PREFIX)?;
|
||||
Ok(BlockchainDb {
|
||||
db,
|
||||
@@ -397,7 +397,7 @@ impl<Block: BlockT> Backend<Block> {
|
||||
///
|
||||
/// The pruning window is how old a block must be before the state is pruned.
|
||||
pub fn new(config: DatabaseSettings, canonicalization_delay: u64) -> Result<Self, client::error::Error> {
|
||||
let db = open_database(&config, "full")?;
|
||||
let db = open_database(&config, columns::META, "full")?;
|
||||
|
||||
Backend::from_kvdb(db as Arc<_>, config.pruning, canonicalization_delay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user