Skip to content

Commit

Permalink
Turn Gingerbread off for CIP-35 test (#10398)
Browse files Browse the repository at this point in the history
CIP-35 support is dropped in Gingerbread, so that hard fork must be
turned off to test CIP-35.
  • Loading branch information
karlb committed Jul 10, 2023
1 parent 0f2dffb commit 28ccf04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/celotool/src/e2e-tests/cip35_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function getGethRunConfig(withDonut: boolean, withEspresso: boolean): GethRunCon
churritoBlock: 0,
donutBlock: withDonut ? 0 : null,
espressoBlock: withEspresso ? 0 : null,
gingerbreadBlock: null,
},
instances: [
{
Expand Down
7 changes: 7 additions & 0 deletions packages/celotool/src/lib/generate_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ export const generateGenesis = ({
churritoBlock,
donutBlock,
espressoBlock,
gingerbreadBlock,
}: GenesisConfig): string => {
const genesis: any = { ...TEMPLATE }

Expand All @@ -411,6 +412,9 @@ export const generateGenesis = ({
if (typeof espressoBlock === 'number') {
genesis.config.espressoBlock = espressoBlock
}
if (typeof gingerbreadBlock === 'number') {
genesis.config.gingerbreadBlock = gingerbreadBlock
}

genesis.config.chainId = chainId

Expand Down Expand Up @@ -539,6 +543,9 @@ export const generateGenesisWithMigrations = async ({
if (genesisConfig.espressoBlock !== undefined) {
mcConfig.hardforks.espressoBlock = genesisConfig.espressoBlock
}
if (genesisConfig.gingerbreadBlock !== undefined) {
mcConfig.hardforks.gingerbreadBlock = genesisConfig.gingerbreadBlock
}
if (genesisConfig.timestamp !== undefined) {
mcConfig.genesisTimestamp = genesisConfig.timestamp
}
Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/lib/interfaces/genesis-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface GenesisConfig {
churritoBlock?: number | null
donutBlock?: number | null
espressoBlock?: number | null
gingerbreadBlock?: number | null
}

0 comments on commit 28ccf04

Please sign in to comment.