Fix Gnosis Chain fork ID (#5487)

This commit is contained in:
Andrew Ashikhmin 2022-09-23 12:26:35 +02:00 committed by GitHub
parent 557db2390f
commit 4b55358bde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -58,6 +58,7 @@ func copyConfig(original *params.ChainConfig) *params.ChainConfig {
BrunoBlock: original.BrunoBlock,
EulerBlock: original.EulerBlock,
GibbsBlock: original.GibbsBlock,
PosdaoBlock: original.PosdaoBlock,
Ethash: original.Ethash,
Clique: original.Clique,
Aura: original.Aura,

View File

@ -145,6 +145,14 @@ func TestCreation(t *testing.T) {
{1735371, ID{Hash: checksumToBytes(0xb96cbd13), Next: 0}}, // First MergeNetsplit block
},
},
// Gnosis test cases
{
params.GnosisChainConfig,
params.GnosisGenesisHash,
[]testcase{
{24000000, ID{Hash: checksumToBytes(0x018479D3), Next: 0}},
},
},
}
for i, tt := range tests {
for j, ttt := range tt.cases {

View File

@ -10,6 +10,7 @@
"constantinopleBlock": 1604400,
"petersburgBlock": 2508800,
"istanbulBlock": 7298030,
"posdaoBlock": 9186425,
"berlinBlock": 16101500,
"londonBlock": 19040000,
"aura": {

View File

@ -259,6 +259,9 @@ type ChainConfig struct {
EulerBlock *big.Int `json:"eulerBlock,omitempty" toml:",omitempty"` // eulerBlock switch block (nil = no fork, 0 = already activated)
GibbsBlock *big.Int `json:"gibbsBlock,omitempty" toml:",omitempty"` // gibbsBlock switch block (nil = no fork, 0 = already activated)
// Gnosis Chain fork blocks
PosdaoBlock *big.Int `json:"posdaoBlock,omitempty"`
// Various consensus engines
Ethash *EthashConfig `json:"ethash,omitempty"`
Clique *CliqueConfig `json:"clique,omitempty"`