mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-13 06:55:50 +00:00
srml: system: prune block hash mapping (#3062)
* srml: system: prune block number to hash mapping * srml: system: add test for block hash mapping pruning * node: bump runtime version * srml: system: wrap long line * srml: system: use parameter type for block hash count * srml: system: prune block hash mapping before storage root calculation * srml: system: keep the genesis hash in block number map
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
use primitives::{DigestItem, traits::IdentityLookup, testing::{Header, UintAuthorityId}};
|
||||
use runtime_io;
|
||||
use srml_support::{impl_outer_origin, impl_outer_event};
|
||||
use srml_support::{impl_outer_origin, impl_outer_event, parameter_types};
|
||||
use substrate_primitives::{H256, Blake2Hasher};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use crate::{AuthorityId, GenesisConfig, Trait, Module, ConsensusLog};
|
||||
@@ -41,6 +41,9 @@ impl Trait for Test {
|
||||
type Event = TestEvent;
|
||||
|
||||
}
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: u64 = 250;
|
||||
}
|
||||
impl system::Trait for Test {
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
@@ -51,6 +54,7 @@ impl system::Trait for Test {
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = Header;
|
||||
type Event = TestEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
}
|
||||
|
||||
mod grandpa {
|
||||
|
||||
Reference in New Issue
Block a user