Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Jan 18, 2024
1 parent cfa85f9 commit 9692007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions politeiawww/cmsaddresswatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (p *politeiawww) restartCMSAddressesWatching(ctx context.Context) error {
}
for _, payments := range paidPayments {
if payments.TxIDs == "" && payments.AmountReceived == 0 {
log.Infof("checking invoice %v that has nothing received, started %v", payments.InvoiceToken, time.Unix(payments.TimeStarted, 0))
payments.Address = strings.TrimSpace(payments.Address)
paid := p.checkHistoricalPayments(ctx, &payments)
if !paid {
Expand Down
4 changes: 3 additions & 1 deletion politeiawww/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,9 @@ func (p *politeiawww) checkForUserPayments(ctx context.Context, pool map[uuid.UU
poolMember.amount, poolMember.txNotBefore,
p.cfg.MinConfirmationsRequired, p.dcrdataHostHTTP())
if err != nil {
log.Errorf("cannot fetch tx: %v\n", err)
if !strings.Contains(err.Error(), "Unprocessable Entity") {
log.Errorf("couldn't fetch tx: %v\n", strings.TrimSpace(err.Error()))
}
continue
}

Expand Down

0 comments on commit 9692007

Please sign in to comment.