Skip to content

Commit fa632ed

Browse files
committed
fix: log transactions as hex ids in txsubmission server
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 0ddfdef commit fa632ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

protocol/txsubmission/server.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"fmt"
1919
"sync"
2020

21+
"github.com/blinklabs-io/gouroboros/ledger/common"
2122
"github.com/blinklabs-io/gouroboros/protocol"
2223
)
2324

@@ -109,9 +110,17 @@ func (s *Server) RequestTxIds(
109110

110111
// RequestTxs requests the content of the requested TX identifiers from the remote node's mempool
111112
func (s *Server) RequestTxs(txIds []TxId) ([]TxBody, error) {
113+
var txString []string
114+
for _, t := range txIds {
115+
ba := []byte{}
116+
for _, b := range t.TxId {
117+
ba = append(ba, b)
118+
}
119+
txString = append(txString, common.NewBlake2b256(ba).String())
120+
}
112121
s.Protocol.Logger().
113122
Debug(
114-
fmt.Sprintf("calling RequestTxs(txIds: %+v)", txIds),
123+
fmt.Sprintf("calling RequestTxs(txIds: %+v)", txString),
115124
"component", "network",
116125
"protocol", ProtocolName,
117126
"role", "server",

0 commit comments

Comments
 (0)