Init merkle-mountain-range

The MMR code is copy from https://github.com/nervosnetwork/ckb/pull/1598
This commit is contained in:
jjy
2019-09-19 16:23:58 +08:00
commit c1211d2ca9
17 changed files with 1065 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
pub use failure::Fail;
pub type Result<T> = ::std::result::Result<T, Error>;
#[derive(Fail, Debug, PartialEq, Eq, Clone)]
pub enum Error {
#[fail(display = "Get root on an empty MMR")]
GetRootOnEmpty,
#[fail(display = "Inconsistent store")]
InconsistentStore,
#[fail(display = "Store error {}", _0)]
StoreError(String),
}