mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
prevent panic in tests with tracer/firehose for nil chainID
This commit is contained in:
parent
7950342821
commit
4178b1170c
1 changed files with 3 additions and 0 deletions
|
|
@ -1791,6 +1791,9 @@ func (f *Firehose) isChainOneOf(chainIDs ...*big.Int) bool {
|
|||
}
|
||||
|
||||
func isChainIDOneOf(actualChainID *big.Int, chainIDs ...*big.Int) bool {
|
||||
if actualChainID == nil {
|
||||
return false
|
||||
}
|
||||
for _, chainID := range chainIDs {
|
||||
if actualChainID.Cmp(chainID) == 0 {
|
||||
return true
|
||||
|
|
|
|||
Loading…
Reference in a new issue