Generic SyncHeader type (#529)

* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
This commit is contained in:
Svyatoslav Nikolsky
2020-11-25 20:41:45 +03:00
committed by Bastian Köcher
parent dd7242bc79
commit 441f63a34f
7 changed files with 71 additions and 76 deletions
@@ -84,6 +84,8 @@ pub trait SourceHeader<Hash, Number>: Clone + std::fmt::Debug + PartialEq + Send
/// Returns ID of header.
fn id(&self) -> HeaderId<Hash, Number>;
/// Returns ID of parent header.
///
/// Panics if called for genesis header.
fn parent_id(&self) -> HeaderId<Hash, Number>;
}