mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
prevent crash
This commit is contained in:
parent
2242bc7aa8
commit
8847102add
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ type historyTestSuite struct {
|
|||
// code of 4444.
|
||||
func errIsPrunedHistory(err error) bool {
|
||||
if err != nil {
|
||||
if rpcErr := err.(rpc.Error); rpcErr != nil && rpcErr.ErrorCode() == 4444 {
|
||||
if rpcErr, ok := err.(rpc.Error); ok && rpcErr.ErrorCode() == 4444 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue