Relay DummyOrdered messages (#318)

* DummyOrdered relay: initial commit

* 1 ML file -> 3 files

* extracted generic message race loop

* uncommented race error procesing

* lane loop tests

* cargo fmt

* moved HeaderId to utils.rs

* restart lane loop on stall

* message delivery strategy tests

* removed obsolete code

* clippy

* Update relays/ethereum/src/message_lane_loop.rs

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

* Update relays/ethereum/src/message_lane_loop.rs

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

* added more races docs

* Update relays/ethereum/src/message_race_delivery.rs

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

* update docs

* Update relays/ethereum/src/message_race_loop.rs

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

* deal with TODOs

* removed docs

* docs

* cargo fmt --all

* Update relays/ethereum/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2020-09-14 12:12:19 +03:00
committed by Bastian Köcher
parent 463a01716c
commit bed44dec13
18 changed files with 1540 additions and 94 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ pub trait SourceBlock {
type Transaction: SourceTransaction;
/// Return hash of the block.
fn id(&self) -> crate::sync_types::HeaderId<Self::Hash, Self::Number>;
fn id(&self) -> crate::utils::HeaderId<Self::Hash, Self::Number>;
/// Return block transactions iterator.
fn transactions(&self) -> Vec<Self::Transaction>;
}
@@ -81,7 +81,7 @@ pub type TransactionOf<P> = <<P as TransactionProofPipeline>::Block as SourceBlo
pub type TransactionHashOf<P> = <TransactionOf<P> as SourceTransaction>::Hash;
/// Header id.
pub type HeaderId<P> = crate::sync_types::HeaderId<BlockHashOf<P>, BlockNumberOf<P>>;
pub type HeaderId<P> = crate::utils::HeaderId<BlockHashOf<P>, BlockNumberOf<P>>;
/// Source client API.
#[async_trait]
@@ -443,7 +443,7 @@ async fn wait_header_finalized<P: TransactionProofPipeline>(
#[cfg(test)]
pub(crate) mod tests {
use super::*;
use crate::sync_types::HeaderId;
use crate::utils::HeaderId;
use parking_lot::Mutex;
use std::{