Skip to content

Commit b86ecfe

Browse files
svyatonikbkchr
authored andcommitted
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
1 parent 59882a7 commit b86ecfe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bridges/modules/messages/src/weights_ext.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ pub fn ensure_weights_are_correct<W: WeightInfoExt>() {
6060
// W::receive_messages_delivery_proof_messages_overhead(1).ref_time() may be zero because:
6161
// there's no code that iterates over confirmed messages in confirmation transaction
6262
assert_eq!(W::receive_messages_delivery_proof_messages_overhead(1).proof_size(), 0);
63-
assert_ne!(W::receive_messages_delivery_proof_relayers_overhead(1).ref_time(), 0);
63+
// W::receive_messages_delivery_proof_relayers_overhead(1).ref_time() may be zero because:
64+
// runtime **can** choose not to pay any rewards to relayers
6465
// W::receive_messages_delivery_proof_relayers_overhead(1).proof_size() is an exception
6566
// it may or may not cause additional db reads, so proof size may vary
6667
assert_ne!(W::storage_proof_size_overhead(1).ref_time(), 0);

bridges/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ impl bp_header_chain::ChainWithGrandpa for RococoBaseAsPolkadot {
6565
const MAX_AUTHORITIES_COUNT: u32 = bp_rococo::Rococo::MAX_AUTHORITIES_COUNT;
6666
const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
6767
bp_rococo::Rococo::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
68-
const MAX_HEADER_SIZE: u32 = bp_rococo::Rococo::MAX_HEADER_SIZE;
69-
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 =
70-
bp_rococo::Rococo::AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
68+
const MAX_MANDATORY_HEADER_SIZE: u32 = bp_rococo::Rococo::MAX_MANDATORY_HEADER_SIZE;
69+
const AVERAGE_HEADER_SIZE: u32 = bp_rococo::Rococo::AVERAGE_HEADER_SIZE;
7170
}
7271

7372
/// Relay `Chain` implementation of Rococo, pretending to be Polkadot.

0 commit comments

Comments
 (0)