Use different chain primitives in Millau (#517)

This commit is contained in:
Svyatoslav Nikolsky
2020-11-18 23:18:42 +03:00
committed by Bastian Köcher
parent 20fc30404a
commit 6dc267393a
15 changed files with 182 additions and 40 deletions
+1 -15
View File
@@ -52,21 +52,7 @@ pub trait HeadersSyncPipeline: Clone + Send + Sync {
/// Headers we're syncing are identified by this hash.
type Hash: Eq + Clone + Copy + Send + Sync + std::fmt::Debug + std::fmt::Display + std::hash::Hash;
/// Headers we're syncing are identified by this number.
type Number: From<u32>
+ Ord
+ Clone
+ Copy
+ Send
+ Sync
+ std::fmt::Debug
+ std::fmt::Display
+ std::hash::Hash
+ std::ops::Add<Output = Self::Number>
+ std::ops::Sub<Output = Self::Number>
+ num_traits::Saturating
+ num_traits::Zero
+ num_traits::One
+ Into<u64>;
type Number: relay_utils::BlockNumberBase;
/// Type of header that we're syncing.
type Header: SourceHeader<Self::Hash, Self::Number>;
/// Type of extra data for the header that we're receiving from the source node: