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))) } }