deferred rollback
This commit is contained in:
parent
9072ebc91e
commit
b305f541a4
@ -404,6 +404,7 @@ func (sds *Service) writeStateDiff(block *types.Block, parentRoot common.Hash, p
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer tx.RollbackOnFailure(err)
|
||||
// defer handling of commit/rollback for any return case
|
||||
output := func(node sdtypes.StateLeafNode) error {
|
||||
return sds.indexer.PushStateNode(tx, node, block.Hash().String())
|
||||
|
Loading…
Reference in New Issue
Block a user