Skip to content

Commit

Permalink
fix: prevent logging for insufficient confs error
Browse files Browse the repository at this point in the history
  • Loading branch information
jazg committed Apr 7, 2021
1 parent 76cd20f commit d4a9c30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion confirmer/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@ func (confirmer *Confirmer) lockTxConfirmed(ctx context.Context, transaction tx.
}
_, err := confirmer.bindings.AccountLockInfo(ctx, lockChain, transaction.Selector.Asset(), input.Txid)
if err != nil {
confirmer.options.Logger.Errorf("[confirmer] cannot get output for account tx=%v (%v): %v", input.Txid.String(), transaction.Selector.String(), err)
if !strings.Contains(err.Error(), "insufficient confirmations") {
confirmer.options.Logger.Errorf("[confirmer] cannot get output for account tx=%v (%v): %v", input.Txid.String(), transaction.Selector.String(), err)
} else {
confirmer.options.Logger.Warnf("[confirmer] cannot get output for account tx=%v (%v): %v", input.Txid.String(), transaction.Selector.String(), err)
}

return false
}
default:
Expand Down

0 comments on commit d4a9c30

Please sign in to comment.