Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #276 from weichang-bianjie/master
Browse files Browse the repository at this point in the history
R4R: ignore transaction duplicate err
  • Loading branch information
kaifei Hu authored Aug 25, 2023
2 parents 8cc0c20 + 84f8408 commit d628a6a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tasks/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,13 @@ func saveDocsWithTxn(blockDoc *models.Block, txDocs []*models.Tx, taskDoc *model
})

if err != nil {
logger.Error("saveDocsWithTxn DoTransaction fail",
logger.Int64("height", blockDoc.Height),
logger.String("err", err.Error()))
return err
if !qmgo.IsDup(err) {
//if err is not mongo E11000 (duplicate err),return err
logger.Error("saveDocsWithTxn DoTransaction fail",
logger.Int64("height", blockDoc.Height),
logger.String("err", err.Error()))
return err
}
}

if len(txEvms) > 0 {
Expand Down

0 comments on commit d628a6a

Please sign in to comment.