Skip to content

Commit

Permalink
Fix occasional race in go test shutdown (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergekh2 authored Jun 25, 2024
1 parent bf3c143 commit 8824f8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/node/crypto/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (c *BlockchainTestContext) mineBlock(ctx context.Context) error {
} else if c.EthClient != nil {
return c.EthClient.Client().Call(nil, "evm_mine")
} else {
panic("no backend or client")
return nil
}
}

Expand All @@ -397,6 +397,7 @@ func (c *BlockchainTestContext) Close() {
}
if c.Backend != nil {
_ = c.Backend.Close()
c.Backend = nil
}
if c.EthClient != nil {
c.EthClient.Close()
Expand Down

0 comments on commit 8824f8c

Please sign in to comment.