core: copy CliqueConfig in DeveloperGenesisBlock (#23068)
Copy the CliqueConfig instead of reusing the pointer. This makes DeveloperGenesisBlock thread safe and prevents it from changing params.AllCliqueProtocolChanges.Clique.Epoch.
This commit is contained in:
parent
4695117f2e
commit
7b6c8363da
|
@ -415,7 +415,10 @@ func DefaultCalaverasGenesisBlock() *Genesis {
|
|||
func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
|
||||
// Override the default period to the user requested one
|
||||
config := *params.AllCliqueProtocolChanges
|
||||
config.Clique.Period = period
|
||||
config.Clique = ¶ms.CliqueConfig{
|
||||
Period: period,
|
||||
Epoch: config.Clique.Epoch,
|
||||
}
|
||||
|
||||
// Assemble and return the genesis with the precompiles and faucet pre-funded
|
||||
return &Genesis{
|
||||
|
|
Loading…
Reference in New Issue