Skip to content

Commit

Permalink
BAARC-96: Use err channel instead of logging
Browse files Browse the repository at this point in the history
  • Loading branch information
boecklim committed Jan 4, 2024
1 parent 4382776 commit f63cf7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metamorph/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,11 @@ func (s *Server) getMerklePath(ctx context.Context, hash *chainhash.Hash, dataSt
if err != nil {
if errors.Is(err, blocktx.ErrTransactionNotFoundForMerklePath) {
if dataStatus == metamorph_api.Status_MINED {
s.logger.Error("Merkle path not found for mined transaction", slog.String("hash", hash.String()), slog.String("err", err.Error()))
errCh <- fmt.Errorf("merkle path not found for mined transaction %s: %v", hash.String(), err)
return
}
} else {
s.logger.Error("failed to get Merkle path for transaction", slog.String("hash", hash.String()), slog.String("err", err.Error()))
errCh <- fmt.Errorf("failed to get Merkle path for transaction %s: %v", hash.String(), err)
return
}
}
Expand Down

0 comments on commit f63cf7d

Please sign in to comment.