From b86ecfeeb7f2381c9290b3a156dc77e0909753d2 Mon Sep 17 00:00:00 2001
From: Svyatoslav Nikolsky <svyatonik@gmail.com>
Date: Fri, 15 Dec 2023 10:11:41 +0300
Subject: [PATCH] remove no longer valid check from the
 ensure_weights_are_correct (#2740)

* remove no longer valid check from the ensure_weights_are_correct

* fix compilation
---
 bridges/modules/messages/src/weights_ext.rs                  | 3 ++-
 .../relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs  | 5 ++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bridges/modules/messages/src/weights_ext.rs b/bridges/modules/messages/src/weights_ext.rs
index aeb3a581a69..c12e04f692b 100644
--- a/bridges/modules/messages/src/weights_ext.rs
+++ b/bridges/modules/messages/src/weights_ext.rs
@@ -60,7 +60,8 @@ pub fn ensure_weights_are_correct<W: WeightInfoExt>() {
 	// W::receive_messages_delivery_proof_messages_overhead(1).ref_time() may be zero because:
 	// there's no code that iterates over confirmed messages in confirmation transaction
 	assert_eq!(W::receive_messages_delivery_proof_messages_overhead(1).proof_size(), 0);
-	assert_ne!(W::receive_messages_delivery_proof_relayers_overhead(1).ref_time(), 0);
+	// W::receive_messages_delivery_proof_relayers_overhead(1).ref_time() may be zero because:
+	// runtime **can** choose not to pay any rewards to relayers
 	// W::receive_messages_delivery_proof_relayers_overhead(1).proof_size() is an exception
 	// it may or may not cause additional db reads, so proof size may vary
 	assert_ne!(W::storage_proof_size_overhead(1).ref_time(), 0);
diff --git a/bridges/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs b/bridges/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs
index 7760913f61c..7e37b62b685 100644
--- a/bridges/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs
+++ b/bridges/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs
@@ -65,9 +65,8 @@ impl bp_header_chain::ChainWithGrandpa for RococoBaseAsPolkadot {
 	const MAX_AUTHORITIES_COUNT: u32 = bp_rococo::Rococo::MAX_AUTHORITIES_COUNT;
 	const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
 		bp_rococo::Rococo::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
-	const MAX_HEADER_SIZE: u32 = bp_rococo::Rococo::MAX_HEADER_SIZE;
-	const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 =
-		bp_rococo::Rococo::AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
+	const MAX_MANDATORY_HEADER_SIZE: u32 = bp_rococo::Rococo::MAX_MANDATORY_HEADER_SIZE;
+	const AVERAGE_HEADER_SIZE: u32 = bp_rococo::Rococo::AVERAGE_HEADER_SIZE;
 }
 
 /// Relay `Chain` implementation of Rococo, pretending to be Polkadot.
-- 
GitLab