Skip to content

Commit

Permalink
fix: log transactions as hex ids in txsubmission server
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Dec 13, 2024
1 parent 0ddfdef commit fa632ed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion protocol/txsubmission/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"sync"

"github.com/blinklabs-io/gouroboros/ledger/common"
"github.com/blinklabs-io/gouroboros/protocol"
)

Expand Down Expand Up @@ -109,9 +110,17 @@ func (s *Server) RequestTxIds(

// RequestTxs requests the content of the requested TX identifiers from the remote node's mempool
func (s *Server) RequestTxs(txIds []TxId) ([]TxBody, error) {
var txString []string
for _, t := range txIds {
ba := []byte{}
for _, b := range t.TxId {
ba = append(ba, b)
}
txString = append(txString, common.NewBlake2b256(ba).String())
}
s.Protocol.Logger().
Debug(
fmt.Sprintf("calling RequestTxs(txIds: %+v)", txIds),
fmt.Sprintf("calling RequestTxs(txIds: %+v)", txString),
"component", "network",
"protocol", ProtocolName,
"role", "server",
Expand Down

0 comments on commit fa632ed

Please sign in to comment.