mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 23:15:42 +00:00
Migrate tx-graph, tx-pool and trie to the 2018 edition (#1611)
This commit is contained in:
committed by
Gav Wood
parent
e6839d2d41
commit
d796e09f02
@@ -5,13 +5,14 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Patricia trie stuff using a parity-codec node format"
|
||||
repository = "https://github.com/paritytech/parity-common"
|
||||
license = "GPL-3.0"
|
||||
edition = "2018"
|
||||
|
||||
[[bench]]
|
||||
name = "bench"
|
||||
harness = false
|
||||
|
||||
[dependencies]
|
||||
parity-codec = { version = "3.0" }
|
||||
codec = { package = "parity-codec", version = "3.0" }
|
||||
hash-db = { version = "0.9", default-features = false }
|
||||
trie-db = { version = "0.9", optional = true }
|
||||
trie-root = { version = "0.9", default-features = false }
|
||||
@@ -32,4 +33,4 @@ std = [
|
||||
"memory-db",
|
||||
"trie-db",
|
||||
"trie-root/std"
|
||||
]
|
||||
]
|
||||
|
||||
@@ -14,17 +14,10 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[macro_use]
|
||||
extern crate criterion;
|
||||
use criterion::Criterion;
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
criterion_group!(benches, benchmark);
|
||||
criterion_main!(benches);
|
||||
|
||||
extern crate substrate_primitives;
|
||||
extern crate keccak_hasher;
|
||||
extern crate substrate_trie;
|
||||
extern crate trie_bench;
|
||||
|
||||
fn benchmark(c: &mut Criterion) {
|
||||
trie_bench::standard_benchmark::<
|
||||
substrate_primitives::Blake2Hasher,
|
||||
|
||||
@@ -18,20 +18,6 @@
|
||||
|
||||
// TODO: no_std
|
||||
|
||||
extern crate trie_root;
|
||||
extern crate parity_codec as codec;
|
||||
extern crate trie_db;
|
||||
extern crate hash_db;
|
||||
extern crate memory_db;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate substrate_primitives;
|
||||
#[cfg(test)]
|
||||
extern crate trie_standardmap;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
mod error;
|
||||
mod node_header;
|
||||
mod node_codec;
|
||||
@@ -281,6 +267,7 @@ mod tests {
|
||||
use hash_db::{HashDB, Hasher};
|
||||
use trie_db::{DBValue, TrieMut, Trie};
|
||||
use trie_standardmap::{Alphabet, ValueMode, StandardMap};
|
||||
use hex_literal::{hex, hex_impl};
|
||||
|
||||
fn check_equivalent(input: &Vec<(&[u8], &[u8])>) {
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::marker::PhantomData;
|
||||
use codec::{Encode, Decode, Compact};
|
||||
use hash_db::Hasher;
|
||||
use trie_db::{self, DBValue, NibbleSlice, node::Node, ChildReference};
|
||||
use error::Error;
|
||||
use crate::error::Error;
|
||||
use super::{EMPTY_TRIE, LEAF_NODE_OFFSET, LEAF_NODE_BIG, EXTENSION_NODE_OFFSET,
|
||||
EXTENSION_NODE_BIG, take, partial_to_key, node_header::NodeHeader, branch_node};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user