mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
getAuthor returns 0x0 for genesis block
This commit is contained in:
parent
1970743f9d
commit
1b941f3274
1 changed files with 4 additions and 0 deletions
|
|
@ -210,6 +210,10 @@ func New(config *params.CliqueConfig, db ethdb.Database) *Clique {
|
|||
// Author implements consensus.Engine, returning the Ethereum address recovered
|
||||
// from the signature in the header's extra-data section.
|
||||
func (c *Clique) Author(header *types.Header) (common.Address, error) {
|
||||
if header.Number.Uint64() == 0 {
|
||||
add := common.HexToAddress("0x0000000000000000000000000000000000000000")
|
||||
return add, nil
|
||||
}
|
||||
return ecrecover(header, c.signatures)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue