Skip to content

Commit b032931

Browse files
committed
Implement Snapshot & Restore modules
1 parent 8738030 commit b032931

File tree

10 files changed

+932
-153
lines changed

10 files changed

+932
-153
lines changed

util/merkle/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ elastic-array = "0.10"
88
rand = "0.6.1"
99
hashdb = {path = "../hashdb" }
1010
codechain-crypto = { git = "https://github.com/CodeChain-io/rust-codechain-crypto.git", version = "0.1" }
11+
memorydb = { path = "../memorydb" }
1112
primitives = { git = "https://github.com/CodeChain-io/rust-codechain-primitives.git", version = "0.4" }
1213
rlp = {path = "../rlp" }
1314
rlp_derive = { path = "../rlp_derive" }

util/merkle/src/chunk.rs

Lines changed: 0 additions & 151 deletions
This file was deleted.

util/merkle/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use ccrypto::BLAKE_NULL_RLP;
3434
use hashdb::{DBValue, HashDB};
3535
use primitives::H256;
3636

37-
pub mod chunk;
37+
pub mod snapshot;
3838
mod nibbleslice;
3939
pub mod node;
4040
mod skewed;

util/merkle/src/nibbleslice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::fmt;
1919
use elastic_array::ElasticArray36;
2020

2121

22-
#[derive(Eq, Ord)]
22+
#[derive(Eq, Ord, Copy, Clone)]
2323
pub struct NibbleSlice<'a> {
2424
pub data: &'a [u8],
2525
pub offset: usize,

0 commit comments

Comments
 (0)