Follow-up on #1419 (#1531)

* Parachains source cosmetic changes

- Make `ParaHashAtSource` more generic
- Modify `on_chain_parachain_header` to return `HeaderId`
- Shortening variable names

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

* Change ParachainsSource::max_head_id type

Change ParachainsSource::max_head_id to Arc<Mutex<NoopOption>>

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

* code review changes
This commit is contained in:
Serban Iorga
2022-08-02 12:49:08 +03:00
committed by Bastian Köcher
parent dd9debed3c
commit 77af92b17b
6 changed files with 92 additions and 102 deletions
+3 -1
View File
@@ -82,7 +82,9 @@ pub const ACCOUNT_DERIVATION_PREFIX: &[u8] = b"pallet-bridge/account-derivation/
pub const ROOT_ACCOUNT_DERIVATION_PREFIX: &[u8] = b"pallet-bridge/account-derivation/root";
/// Generic header Id.
#[derive(RuntimeDebug, Default, Clone, Encode, Decode, Copy, Eq, Hash, PartialEq)]
#[derive(
RuntimeDebug, Default, Clone, Encode, Decode, Copy, Eq, Hash, PartialEq, PartialOrd, Ord,
)]
pub struct HeaderId<Hash, Number>(pub Number, pub Hash);
/// Generic header id provider.