@chainsafe/lodestar-config
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -29,4 +29,7 @@ "use strict"; | ||
var _forkTypes = require("./forkTypes"); | ||
function createIBeaconConfig(params) { | ||
const types = (0, _lodestarTypes.createIBeaconSSZTypes)(params); | ||
const forkTypes = (0, _forkTypes.getForkTypesRecord)(types); | ||
const phase0 = { | ||
@@ -41,16 +44,17 @@ name: _interface.ForkName.phase0, | ||
version: params.ALTAIR_FORK_VERSION | ||
}; | ||
/** Forks in order order of occurence, `phase0` first */ | ||
// Note: Downstream code relies on proper ordering. | ||
const forks = { | ||
phase0, | ||
altair | ||
}; // Prevents allocating an array on every getForkInfo() call | ||
const forksDescendingEpochOrder = [altair, phase0]; | ||
const forksDescendingEpochOrder = Object.values(forks).reverse(); | ||
return { | ||
params, | ||
types, | ||
forks, | ||
/** Forks in order order of occurence, `phase0` first */ | ||
// Note: Downstream code relies on proper ordering. | ||
forks: { | ||
phase0, | ||
altair | ||
}, | ||
// Fork convenience methods | ||
@@ -75,4 +79,4 @@ getForkInfo(slot) { | ||
getTypes(slot) { | ||
return types[this.getForkName(slot)]; | ||
getForkTypes(slot) { | ||
return forkTypes[this.getForkName(slot)]; | ||
} | ||
@@ -79,0 +83,0 @@ |
@@ -15,5 +15,7 @@ import { IBeaconParams } from "@chainsafe/lodestar-params"; | ||
types: IBeaconSSZTypes; | ||
/** Forks in order order of occurence, `phase0` first */ | ||
forks: { | ||
[K in ForkName]: IForkInfo; | ||
}; | ||
/** Get the hard-fork info for the active fork at `slot` */ | ||
getForkInfo(slot: Slot): IForkInfo; | ||
@@ -25,4 +27,4 @@ /** Get the hard-fork name at a given slot */ | ||
/** Get SSZ types by hard-fork */ | ||
getTypes(slot: Slot): AllForksSSZTypes; | ||
getForkTypes(slot: Slot): AllForksSSZTypes; | ||
} | ||
//# sourceMappingURL=interface.d.ts.map |
{ | ||
"name": "@chainsafe/lodestar-config", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "Chain configuration required for lodestar", | ||
@@ -47,6 +47,6 @@ "author": "ChainSafe Systems", | ||
"dependencies": { | ||
"@chainsafe/lodestar-params": "^0.21.0", | ||
"@chainsafe/lodestar-types": "^0.21.0" | ||
"@chainsafe/lodestar-params": "^0.22.0", | ||
"@chainsafe/lodestar-types": "^0.22.0" | ||
}, | ||
"gitHead": "58d4adda54d0b87f57c02af91345f0c2818816b9" | ||
"gitHead": "c37afddf34e0459c9c2991c8902ea14c9a947fc0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28643
24
177
+ Added@chainsafe/lodestar-params@0.22.0(transitive)
+ Added@chainsafe/lodestar-types@0.22.0(transitive)
- Removed@chainsafe/lodestar-params@0.21.0(transitive)
- Removed@chainsafe/lodestar-types@0.21.0(transitive)