Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix few logs #596

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading