Follow-up on #1487 (#1511)

* Remove unused trait implementations

Signed-off-by: Serban Iorga <serban@parity.io>

* Define encoded_size_hint_u32()

Signed-off-by: Serban Iorga <serban@parity.io>

* Define TransactionEstimationParams trait

Signed-off-by: Serban Iorga <serban@parity.io>

* Rework TransactionEstimation

Signed-off-by: Serban Iorga <serban@parity.io>

* Docs + Renamings

Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
Serban Iorga
2022-07-18 13:19:06 +03:00
committed by Bastian Köcher
parent dc38e3d079
commit 1e0c2a6e02
9 changed files with 115 additions and 101 deletions
@@ -468,9 +468,7 @@ where
fn prepare_dummy_messages_delivery_proof<SC: Chain, TC: Chain>(
) -> SubstrateMessagesDeliveryProof<TC> {
let single_message_confirmation_size =
bp_messages::InboundLaneData::<()>::encoded_size_hint(1, 1)
.and_then(|x| u32::try_from(x).ok())
.unwrap_or(u32::MAX);
bp_messages::InboundLaneData::<()>::encoded_size_hint_u32(1, 1);
let proof_size = TC::STORAGE_PROOF_OVERHEAD.saturating_add(single_message_confirmation_size);
(
UnrewardedRelayersState {