prevent crash

This commit is contained in:
Jared Wasinger 2025-03-12 11:54:00 +01:00 committed by Felix Lange
parent 2242bc7aa8
commit 8847102add

View file

@ -47,7 +47,7 @@ type historyTestSuite struct {
// code of 4444. // code of 4444.
func errIsPrunedHistory(err error) bool { func errIsPrunedHistory(err error) bool {
if err != nil { 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 return true
} }
} }