Skip to content

Commit 1906ae8

Browse files
authored
return error on processing error (iotexproject#2161)
1 parent 8ca498d commit 1906ae8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

state/factory/workingset.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ func (ws *workingSet) ValidateBlock(ctx context.Context, blk *block.Block) error
448448
}
449449
receipts, err := ws.process(ctx, blk.RunnableActions().Actions())
450450
if err != nil {
451-
log.L().Panic("Failed to update state.", zap.Uint64("height", ws.height), zap.Error(err))
451+
log.L().Error("Failed to update state.", zap.Uint64("height", ws.height), zap.Error(err))
452+
return err
452453
}
453454

454455
digest, err := ws.digest()

0 commit comments

Comments
 (0)