diff --git a/statediff/service.go b/statediff/service.go index 4daf19fdf..6a6d92fb4 100644 --- a/statediff/service.go +++ b/statediff/service.go @@ -529,6 +529,9 @@ func (sds *Service) writeStateDiff(block *types.Block, parentRoot common.Hash, p receipts = sds.BlockChain.GetReceiptsByHash(block.Hash()) } tx, err := sds.indexer.PushBlock(block, receipts, totalDifficulty) + if err != nil { + return err + } // defer handling of commit/rollback for any return case defer tx.Close() output := func(node StateNode) error {