From 6ac8eca1de4b6fa447da46053a598e911256237a Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Tue, 2 Apr 2024 13:55:07 +0300 Subject: [PATCH] ckb-merkle-mountain-range -> 0.5.2 (#2911) --- bridges/modules/beefy/Cargo.toml | 2 +- bridges/modules/beefy/src/mock_chain.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/modules/beefy/Cargo.toml b/bridges/modules/beefy/Cargo.toml index d0e5204dcbea1..2c552430c98f9 100644 --- a/bridges/modules/beefy/Cargo.toml +++ b/bridges/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/bridges/modules/beefy/src/mock_chain.rs b/bridges/modules/beefy/src/mock_chain.rs index c4fa74915bfeb..c83907f839568 100644 --- a/bridges/modules/beefy/src/mock_chain.rs +++ b/bridges/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))) } }