Skip to content

Commit

Permalink
Fix few logs
Browse files Browse the repository at this point in the history
  • Loading branch information
boecklim committed Sep 23, 2024
1 parent 0eaca74 commit d135d9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions internal/metamorph/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import (
"sync"
"time"

"github.com/bitcoin-sv/arc/internal/blocktx/blocktx_api"
"github.com/bitcoin-sv/arc/internal/metamorph/metamorph_api"
"github.com/bitcoin-sv/arc/internal/metamorph/store"
"github.com/libsv/go-p2p"
"github.com/libsv/go-p2p/chaincfg/chainhash"
"google.golang.org/protobuf/proto"

"github.com/bitcoin-sv/arc/internal/blocktx/blocktx_api"
"github.com/bitcoin-sv/arc/internal/metamorph/metamorph_api"
"github.com/bitcoin-sv/arc/internal/metamorph/store"
)

const (
Expand Down Expand Up @@ -540,7 +541,7 @@ func (p *Processor) StartRequestingSeenOnNetworkTxs() {
for _, tx := range seenOnNetworkTxs {
// by requesting tx, blocktx checks if it has the transaction mined in the database and sends it back
if err = p.mqClient.Publish(RequestTxTopic, tx.Hash[:]); err != nil {
p.logger.Error("failed to request tx from blocktx", slog.String("hash", tx.Hash.String()))
p.logger.Error("failed to request tx from blocktx", slog.String("hash", tx.Hash.String()), slog.String("err", err.Error()))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/woc_client/woc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (w *WocClient) GetBalanceWithRetries(ctx context.Context, address string, c
}

notify := func(err error, nextTry time.Duration) {
w.logger.Error("failed to get utxos from WoC", slog.String("address", address), slog.String("next try", nextTry.String()), slog.String("err", err.Error()))
w.logger.Error("failed to get balance from WoC", slog.String("address", address), slog.String("next try", nextTry.String()), slog.String("err", err.Error()))
}

balanceRes, err := backoff.RetryNotifyWithData(operation, policyContext, notify)
Expand Down

0 comments on commit d135d9b

Please sign in to comment.