diff --git a/Cargo.lock b/Cargo.lock index 5050cc63f20..fc3fb032ff9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1606,15 +1606,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ckb-merkle-mountain-range" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f061f97d64fd1822664bdfb722f7ae5469a97b77567390f7442be5b5dc82a5b" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "ckb-merkle-mountain-range" version = "0.5.2" @@ -5342,7 +5333,7 @@ dependencies = [ "bp-beefy", "bp-runtime", "bp-test-utils", - "ckb-merkle-mountain-range 0.3.2", + "ckb-merkle-mountain-range", "frame-support", "frame-system", "log", @@ -8584,7 +8575,7 @@ name = "sp-mmr-primitives" version = "26.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#e6bd9205432bb524e94c9bd13048d645ec9aa5c7" dependencies = [ - "ckb-merkle-mountain-range 0.5.2", + "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", diff --git a/modules/beefy/Cargo.toml b/modules/beefy/Cargo.toml index d0e5204dcbe..2c552430c98 100644 --- a/modules/beefy/Cargo.toml +++ b/modules/beefy/Cargo.toml @@ -32,7 +32,7 @@ sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" [dev-dependencies] sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -mmr-lib = { package = "ckb-merkle-mountain-range", version = "0.3.2" } +mmr-lib = { package = "ckb-merkle-mountain-range", version = "0.5.2" } pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } pallet-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } rand = "0.8.5" diff --git a/modules/beefy/src/mock_chain.rs b/modules/beefy/src/mock_chain.rs index c4fa74915bf..c83907f8395 100644 --- a/modules/beefy/src/mock_chain.rs +++ b/modules/beefy/src/mock_chain.rs @@ -290,10 +290,10 @@ pub struct BridgedMmrHashMerge; impl mmr_lib::Merge for BridgedMmrHashMerge { type Item = TestBridgedMmrNode; - fn merge(left: &Self::Item, right: &Self::Item) -> Self::Item { + fn merge(left: &Self::Item, right: &Self::Item) -> mmr_lib::Result { let mut concat = left.hash().as_ref().to_vec(); concat.extend_from_slice(right.hash().as_ref()); - TestBridgedMmrNode::Hash(TestBridgedMmrHashing::hash(&concat)) + Ok(TestBridgedMmrNode::Hash(TestBridgedMmrHashing::hash(&concat))) } }