Fix delivery transaction estimation used by rational relayer (#1109)

* fix delivery transaction estimation in greedy relayer

* fixed typo

* improve logging

* improve logging

* fmt

* fix compilation

* fmt

* Update relays/lib-substrate-relay/src/messages_target.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* review

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2021-09-06 12:04:33 +03:00
committed by Bastian Köcher
parent 2101ed9cc5
commit 03a54df398
35 changed files with 391 additions and 71 deletions
@@ -210,6 +210,7 @@ pub trait TargetClient<P: MessageLane>: RelayClient {
async fn estimate_delivery_transaction_in_source_tokens(
&self,
nonces: RangeInclusive<MessageNonce>,
total_prepaid_nonces: MessageNonce,
total_dispatch_weight: Weight,
total_size: u32,
) -> Result<P::SourceChainBalance, Self::Error>;
@@ -773,6 +774,7 @@ pub(crate) mod tests {
async fn estimate_delivery_transaction_in_source_tokens(
&self,
nonces: RangeInclusive<MessageNonce>,
_total_prepaid_nonces: MessageNonce,
total_dispatch_weight: Weight,
total_size: u32,
) -> Result<TestSourceChainBalance, TestError> {