mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/types: improve chainID assertion
This commit is contained in:
parent
c3f5dde938
commit
2240538960
1 changed files with 2 additions and 2 deletions
|
|
@ -189,8 +189,8 @@ type modernSigner struct {
|
|||
}
|
||||
|
||||
func newModernSigner(chainID *big.Int, fork forks.Fork) Signer {
|
||||
if chainID == nil {
|
||||
panic("nil chainID")
|
||||
if chainID == nil || chainID.Sign() <= 0 {
|
||||
panic(fmt.Sprintf("invalid chainID %v", chainID))
|
||||
}
|
||||
s := &modernSigner{
|
||||
chainID: chainID,
|
||||
|
|
|
|||
Loading…
Reference in a new issue