Skip to content

Commit 8cacb42

Browse files
gurukamathfjlholiman
authored
core: verify genesis extradata for clique (#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 9f75994 commit 8cacb42

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
@@ -397,7 +397,7 @@ func (g *Genesis) Commit(db ethdb.Database) (*types.Block, error) {
397397
if err := config.CheckConfigForkOrder(); err != nil {
398398
return nil, err
399399
}
400-
if config.Clique != nil && len(block.Extra()) == 0 {
400+
if config.Clique != nil && len(block.Extra()) < 32+crypto.SignatureLength {
401401
return nil, errors.New("can't start clique chain without signers")
402402
}
403403
if err := g.Alloc.write(db, block.Hash()); err != nil {

0 commit comments

Comments
 (0)