mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +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 {
|
func newModernSigner(chainID *big.Int, fork forks.Fork) Signer {
|
||||||
if chainID == nil {
|
if chainID == nil || chainID.Sign() <= 0 {
|
||||||
panic("nil chainID")
|
panic(fmt.Sprintf("invalid chainID %v", chainID))
|
||||||
}
|
}
|
||||||
s := &modernSigner{
|
s := &modernSigner{
|
||||||
chainID: chainID,
|
chainID: chainID,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue