mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +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:
@@ -23,8 +23,8 @@ sp-state-machine = { version = "0.12.0", path = "../../../primitives/state-machi
|
||||
serde = "1.0.136"
|
||||
serde_json = "1.0.85"
|
||||
derive_more = { version = "0.99.17", default-features = false, features = ["display"] }
|
||||
kvdb = "0.11.0"
|
||||
kvdb-rocksdb = "0.15.1"
|
||||
kvdb = "0.12.0"
|
||||
kvdb-rocksdb = "0.16.0"
|
||||
sp-trie = { version = "6.0.0", path = "../../../primitives/trie" }
|
||||
sp-core = { version = "6.0.0", path = "../../../primitives/core" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
@@ -37,7 +37,7 @@ tempfile = "3.1.0"
|
||||
fs_extra = "1"
|
||||
rand = { version = "0.7.2", features = ["small_rng"] }
|
||||
lazy_static = "1.4.0"
|
||||
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-db = { version = "0.3" }
|
||||
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use kvdb::{DBTransaction, KeyValueDB};
|
||||
use kvdb::{DBKeyValue, DBTransaction, KeyValueDB};
|
||||
use kvdb_rocksdb::{Database, DatabaseConfig};
|
||||
use std::{io, path::PathBuf, sync::Arc};
|
||||
|
||||
@@ -38,7 +38,7 @@ impl KeyValueDB for ParityDbWrapper {
|
||||
}
|
||||
|
||||
/// Get a value by partial key. Only works for flushed data.
|
||||
fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> Option<Box<[u8]>> {
|
||||
fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> io::Result<Option<Vec<u8>>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ impl KeyValueDB for ParityDbWrapper {
|
||||
}
|
||||
|
||||
/// Iterate over flushed data for a given column.
|
||||
fn iter<'a>(&'a self, _col: u32) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
|
||||
fn iter<'a>(&'a self, _col: u32) -> Box<dyn Iterator<Item = io::Result<DBKeyValue>> + 'a> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
@@ -65,12 +65,7 @@ impl KeyValueDB for ParityDbWrapper {
|
||||
&'a self,
|
||||
_col: u32,
|
||||
_prefix: &'a [u8],
|
||||
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Attempt to replace this database with a new one located at the given path.
|
||||
fn restore(&self, _new_db: &str) -> io::Result<()> {
|
||||
) -> Box<dyn Iterator<Item = io::Result<DBKeyValue>> + 'a> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ mod tests {
|
||||
let b2 = ExtrinsicAddress::from_str("0 0");
|
||||
let b3 = ExtrinsicAddress::from_str("0x0012345f");
|
||||
|
||||
assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into()));
|
||||
assert_eq!(e0, Ok(ExtrinsicAddress::Bytes(vec![0x12, 0x34])));
|
||||
assert_eq!(
|
||||
b0,
|
||||
Ok(ExtrinsicAddress::Block(
|
||||
@@ -305,7 +305,7 @@ mod tests {
|
||||
))
|
||||
);
|
||||
assert_eq!(b1, Ok(ExtrinsicAddress::Block(BlockAddress::Number(1234), 0)));
|
||||
assert_eq!(b2, Ok(ExtrinsicAddress::Block(BlockAddress::Number(0), 0)));
|
||||
assert_eq!(b2, Ok(ExtrinsicAddress::Bytes(vec![0, 0])));
|
||||
assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f])));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user