Skip to content

Commit

Permalink
Merge pull request #378 from bitcoin-sv/add-log-to-query
Browse files Browse the repository at this point in the history
log hash
  • Loading branch information
shotasilagadzetaal authored Apr 19, 2024
2 parents bf48fb5 + 9b0f7aa commit 44df539
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/blocktx/peer_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 44df539

Please sign in to comment.