mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 20:01:08 +00:00
update kvdb & co (#12312)
* upgrade kvdb & co * remove patch * update Cargo.lock * upgrade impl-serde * fix parsing test * actually fix it * FFS
This commit is contained in:
@@ -17,9 +17,9 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
|
||||
"derive",
|
||||
] }
|
||||
hash-db = "0.15.2"
|
||||
kvdb = "0.11.0"
|
||||
kvdb-memorydb = "0.11.0"
|
||||
kvdb-rocksdb = { version = "0.15.2", optional = true }
|
||||
kvdb = "0.12.0"
|
||||
kvdb-memorydb = "0.12.0"
|
||||
kvdb-rocksdb = { version = "0.16.0", optional = true }
|
||||
linked-hash-map = "0.5.4"
|
||||
log = "0.4.17"
|
||||
parity-db = "0.3.16"
|
||||
@@ -36,7 +36,7 @@ sp-trie = { version = "6.0.0", path = "../../primitives/trie" }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3.3"
|
||||
kvdb-rocksdb = "0.15.1"
|
||||
kvdb-rocksdb = "0.16.0"
|
||||
rand = "0.8.4"
|
||||
tempfile = "3.1.0"
|
||||
quickcheck = { version = "1.0.3", default-features = false }
|
||||
|
||||
@@ -115,7 +115,7 @@ pub fn upgrade_db<Block: BlockT>(db_path: &Path, db_type: DatabaseType) -> Upgra
|
||||
/// 2) transactions column is added;
|
||||
fn migrate_1_to_2<Block: BlockT>(db_path: &Path, _db_type: DatabaseType) -> UpgradeResult<()> {
|
||||
let db_cfg = DatabaseConfig::with_columns(V1_NUM_COLUMNS);
|
||||
let db = Database::open(&db_cfg, db_path)?;
|
||||
let mut db = Database::open(&db_cfg, db_path)?;
|
||||
db.add_column().map_err(Into::into)
|
||||
}
|
||||
|
||||
@@ -126,7 +126,10 @@ fn migrate_2_to_3<Block: BlockT>(db_path: &Path, _db_type: DatabaseType) -> Upgr
|
||||
let db = Database::open(&db_cfg, db_path)?;
|
||||
|
||||
// Get all the keys we need to update
|
||||
let keys: Vec<_> = db.iter(columns::JUSTIFICATIONS).map(|entry| entry.0).collect();
|
||||
let keys: Vec<_> = db
|
||||
.iter(columns::JUSTIFICATIONS)
|
||||
.map(|r| r.map(|e| e.0))
|
||||
.collect::<Result<_, _>>()?;
|
||||
|
||||
// Read and update each entry
|
||||
let mut transaction = db.transaction();
|
||||
@@ -152,7 +155,7 @@ fn migrate_2_to_3<Block: BlockT>(db_path: &Path, _db_type: DatabaseType) -> Upgr
|
||||
/// 2) BODY_INDEX column is added;
|
||||
fn migrate_3_to_4<Block: BlockT>(db_path: &Path, _db_type: DatabaseType) -> UpgradeResult<()> {
|
||||
let db_cfg = DatabaseConfig::with_columns(V3_NUM_COLUMNS);
|
||||
let db = Database::open(&db_cfg, db_path)?;
|
||||
let mut db = Database::open(&db_cfg, db_path)?;
|
||||
db.add_column().map_err(Into::into)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ ansi_term = "0.12.1"
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.1"
|
||||
log = "0.4.17"
|
||||
parity-util-mem = { version = "0.11.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sc-network-common = { version = "0.10.0-dev", path = "../network/common" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/api" }
|
||||
|
||||
@@ -80,7 +80,7 @@ sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
|
||||
sc-sysinfo = { version = "6.0.0-dev", path = "../sysinfo" }
|
||||
tracing = "0.1.29"
|
||||
tracing-futures = { version = "0.2.4" }
|
||||
parity-util-mem = { version = "0.11.0", default-features = false, features = [
|
||||
parity-util-mem = { version = "0.12.0", default-features = false, features = [
|
||||
"primitive-types",
|
||||
] }
|
||||
async-trait = "0.1.57"
|
||||
|
||||
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
|
||||
log = "0.4.17"
|
||||
parity-util-mem = { version = "0.11.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem-derive = "0.1.0"
|
||||
parking_lot = "0.12.1"
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
|
||||
@@ -18,7 +18,7 @@ futures = "0.3.21"
|
||||
futures-timer = "3.0.2"
|
||||
linked-hash-map = "0.5.4"
|
||||
log = "0.4.17"
|
||||
parity-util-mem = { version = "0.11.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
|
||||
parking_lot = "0.12.1"
|
||||
serde = { version = "1.0.136", features = ["derive"] }
|
||||
thiserror = "1.0.30"
|
||||
|
||||
Reference in New Issue
Block a user