Skip to content

Commit 981b7d3

Browse files
gurukamathfjlholiman
authored andcommitted
core: verify genesis extradata for clique (ethereum#24470)
* Add extra-data checks for clique genesis * Update genesis.go * Update genesis.go * core: simplify clique genesis check Co-authored-by: Felix Lange <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]>
1 parent 44c91b2 commit 981b7d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (g *Genesis) Commit(db ethdb.Database) (*types.Block, error) {
404404
if err := config.CheckConfigForkOrder(); err != nil {
405405
return nil, err
406406
}
407-
if config.Clique != nil && len(block.Extra()) == 0 {
407+
if config.Clique != nil && len(block.Extra()) < 32+crypto.SignatureLength {
408408
return nil, errors.New("can't start clique chain without signers")
409409
}
410410
if err := g.Alloc.write(db, block.Hash()); err != nil {

0 commit comments

Comments
 (0)