-
-
Notifications
You must be signed in to change notification settings - Fork 436
Misc changes from eip-4844 branch #4924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import {IBeaconClock} from "./interface.js"; | |
| export class LocalClock implements IBeaconClock { | ||
| private readonly config: IChainForkConfig; | ||
| private readonly genesisTime: number; | ||
| private timeoutId: NodeJS.Timeout; | ||
| private timeoutId: number | NodeJS.Timeout; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allows to compile with any recent @types/node version. Has caused issues when installing individual local packages like c-kzg |
||
| private readonly emitter: ChainEventEmitter; | ||
| private readonly signal: AbortSignal; | ||
| private _currentSlot: number; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,20 +12,23 @@ const testCases: {name: string; items: [IChainConfig, Record<string, string>]}[] | |
| {name: "nimbus", items: [networksChainConfig.ropsten, nimbusRopstenConfig]}, | ||
| ]; | ||
|
|
||
| /* eslint-disable @typescript-eslint/naming-convention */ | ||
|
|
||
| describe("utils / params / assertEqualParams", () => { | ||
| it("default == default", () => { | ||
| const chainConfigJson = chainConfigToJson(chainConfig); | ||
| assertEqualParams(chainConfig, chainConfigJson); | ||
| }); | ||
|
|
||
| it("default != other", () => { | ||
| const chainConfigJson = chainConfigToJson(chainConfig); | ||
| const ALTAIR_FORK_EPOCH = 10; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make test deterministic test independent of current values of the default chain spec |
||
| const localConfig: typeof chainConfig = {...chainConfig, ALTAIR_FORK_EPOCH}; | ||
| const chainConfigJson = chainConfigToJson(localConfig); | ||
|
|
||
| // Force ALTAIR_FORK_EPOCH value to be different | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| const otherConfig = {...chainConfigJson, ALTAIR_FORK_EPOCH: String(chainConfig.ALTAIR_FORK_EPOCH + 1)}; | ||
| const otherConfig = {...chainConfigJson, ALTAIR_FORK_EPOCH: String(ALTAIR_FORK_EPOCH + 1)}; | ||
|
|
||
| expect(() => assertEqualParams(chainConfig, otherConfig)).to.throw(NotEqualParamsError); | ||
| expect(() => assertEqualParams(localConfig, otherConfig)).to.throw(NotEqualParamsError); | ||
| }); | ||
|
|
||
| it("should fill missing remote values with default and be equal", () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary async function