mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 14:27:57 +00:00
Finality votes cache (#116)
* removeInMemoryStorage + extract Kovan stuff to runtime * removed comment from the future * remove redundant conversions * remove redundant `u8 as usize` * remove redundant `u8 as usize` * Update modules/ethereum/src/mock.rs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * use hex-literal in kovan config * cargo fmt --all * extracted insert_header * cargo fmt --all * finality cache * cargo fmt --all * cargo fmt --all * impl Default for FinalityVotes Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> Co-authored-by: Hernando Castano <castano.ha@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
ca8b370de2
commit
643075f7fa
@@ -216,12 +216,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 = ();
|
||||
}
|
||||
@@ -495,7 +497,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 {
|
||||
|
||||
Reference in New Issue
Block a user