From 9b0f7aab919f4d11189ce4216c5f05ce37ef427f Mon Sep 17 00:00:00 2001 From: ssilagadze Date: Thu, 18 Apr 2024 12:25:34 +0200 Subject: [PATCH] log hash --- internal/blocktx/peer_handler.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/blocktx/peer_handler.go b/internal/blocktx/peer_handler.go index 9d2d09a79..68a3d2ec1 100644 --- a/internal/blocktx/peer_handler.go +++ b/internal/blocktx/peer_handler.go @@ -373,9 +373,14 @@ func (ph *PeerHandler) startProcessRequestTxs() { case <-ph.quitListenRequestTxChannel: return case txHash := <-ph.requestTxChannel: - blockHash, blockHeight, merklePath, err := ph.store.GetMinedTransaction(context.Background(), txHash) + tx, err := chainhash.NewHash(txHash) if err != nil { - ph.logger.Error("Couldn't get mined transactions from store", slog.String("err", err.Error())) + ph.logger.Error("Couldn't create tx from byte array") + } + + blockHash, blockHeight, merklePath, err := ph.store.GetMinedTransaction(context.Background(), tx[:]) + if err != nil { + ph.logger.Error("Couldn't get mined transactions from store", slog.String("hash", tx.String()), slog.String("err", err.Error())) continue }