Skip to content

Commit

Permalink
finality cache
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed Jun 1, 2020
1 parent 743b7d2 commit fc63d30
Show file tree
Hide file tree
Showing 8 changed files with 769 additions and 246 deletions.
5 changes: 4 additions & 1 deletion bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ impl pallet_aura::Trait for Runtime {
}

parameter_types! {
pub const FinalityVotesCachingInterval: Option<u64> = Some(16);
pub const KovanAuraConfiguration: pallet_bridge_eth_poa::AuraConfiguration = kovan::kovan_aura_configuration();
pub const KovanValidatorsConfiguration: pallet_bridge_eth_poa::ValidatorsConfiguration = kovan::kovan_validators_configuration();
}

impl pallet_bridge_eth_poa::Trait for Runtime {
type AuraConfiguration = KovanAuraConfiguration;
type FinalityVotesCachingInterval = FinalityVotesCachingInterval;
type ValidatorsConfiguration = KovanValidatorsConfiguration;
type OnHeadersSubmitted = ();
}
Expand Down Expand Up @@ -434,7 +436,8 @@ impl_runtime_apis! {

impl sp_bridge_eth_poa::EthereumHeadersApi<Block> for Runtime {
fn best_block() -> (u64, sp_bridge_eth_poa::H256) {
BridgeEthPoA::best_block()
let best_block = BridgeEthPoA::best_block();
(best_block.number, best_block.hash)
}

fn is_import_requires_receipts(header: sp_bridge_eth_poa::Header) -> bool {
Expand Down
Loading

0 comments on commit fc63d30

Please sign in to comment.