mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +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:
@@ -111,6 +111,10 @@ pub fn native_version() -> NativeVersion {
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 250;
|
||||
}
|
||||
|
||||
impl system::Trait for Runtime {
|
||||
/// The identifier used to distinguish between accounts.
|
||||
type AccountId = AccountId;
|
||||
@@ -130,6 +134,8 @@ impl system::Trait for Runtime {
|
||||
type Event = Event;
|
||||
/// The ubiquitous origin type.
|
||||
type Origin = Origin;
|
||||
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||
type BlockHashCount = BlockHashCount;
|
||||
}
|
||||
|
||||
impl aura::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user