mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +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:
@@ -71,8 +71,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to equal spec_version. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 106,
|
||||
impl_version: 106,
|
||||
spec_version: 107,
|
||||
impl_version: 107,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -111,6 +111,10 @@ pub const MINUTES: Moment = 60 / SECS_PER_BLOCK;
|
||||
pub const HOURS: Moment = MINUTES * 60;
|
||||
pub const DAYS: Moment = HOURS * 24;
|
||||
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 250;
|
||||
}
|
||||
|
||||
impl system::Trait for Runtime {
|
||||
type Origin = Origin;
|
||||
type Index = Index;
|
||||
@@ -121,6 +125,7 @@ impl system::Trait for Runtime {
|
||||
type Lookup = Indices;
|
||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
type Event = Event;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
}
|
||||
|
||||
impl aura::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user