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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer tx.RollbackOnFailure(err)
|
||||||
// defer handling of commit/rollback for any return case
|
// defer handling of commit/rollback for any return case
|
||||||
output := func(node sdtypes.StateLeafNode) error {
|
output := func(node sdtypes.StateLeafNode) error {
|
||||||
return sds.indexer.PushStateNode(tx, node, block.Hash().String())
|
return sds.indexer.PushStateNode(tx, node, block.Hash().String())
|
||||||
|
Loading…
Reference in New Issue
Block a user