mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
addressed comments, Author() never returns error, returns 0x0 insted
This commit is contained in:
parent
0173d61d9f
commit
c0ad424824
2 changed files with 18 additions and 2 deletions
|
|
@ -292,7 +292,15 @@ func (c *Bor) Author(header *types.Header) (common.Address, error) {
|
|||
add := common.HexToAddress("0x0000000000000000000000000000000000000000")
|
||||
return add, nil
|
||||
}
|
||||
return ecrecover(header, c.signatures, c.config)
|
||||
|
||||
add, err := ecrecover(header, c.signatures, c.config)
|
||||
|
||||
if err != nil {
|
||||
add := common.HexToAddress("0x0000000000000000000000000000000000000000")
|
||||
return add, nil
|
||||
} else {
|
||||
return add, nil
|
||||
}
|
||||
}
|
||||
|
||||
// VerifyHeader checks whether a header conforms to the consensus rules.
|
||||
|
|
|
|||
|
|
@ -214,7 +214,15 @@ func (c *Clique) Author(header *types.Header) (common.Address, error) {
|
|||
add := common.HexToAddress("0x0000000000000000000000000000000000000000")
|
||||
return add, nil
|
||||
}
|
||||
return ecrecover(header, c.signatures)
|
||||
|
||||
add, err := ecrecover(header, c.signatures)
|
||||
|
||||
if err != nil {
|
||||
add := common.HexToAddress("0x0000000000000000000000000000000000000000")
|
||||
return add, nil
|
||||
} else {
|
||||
return add, nil
|
||||
}
|
||||
}
|
||||
|
||||
// VerifyHeader checks whether a header conforms to the consensus rules.
|
||||
|
|
|
|||
Loading…
Reference in a new issue