Skip to content

Commit 1fc9d17

Browse files
committed
rfq+rfqmsg: improve logging, fix err msg
1 parent df4bc86 commit 1fc9d17

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

rfq/stream.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func (h *StreamHandler) handleIncomingWireMessage(
120120
switch msg.(type) {
121121
case *rfqmsg.BuyAccept, *rfqmsg.SellAccept, *rfqmsg.Reject:
122122
h.outgoingRequests.Delete(msg.MsgID())
123+
log.Tracef("Deleted outgoing request with ID %s", msg.MsgID())
123124
}
124125

125126
// Send the incoming message to the RFQ manager.
@@ -163,9 +164,13 @@ func (h *StreamHandler) HandleOutgoingMessage(
163164
switch msg := outgoingMsg.(type) {
164165
case *rfqmsg.BuyRequest:
165166
h.outgoingRequests.Store(msg.ID, msg)
167+
log.Tracef("Stored outgoing request with ID %s",
168+
msg.ID.String())
166169

167170
case *rfqmsg.SellRequest:
168171
h.outgoingRequests.Store(msg.ID, msg)
172+
log.Tracef("Stored outgoing request with ID %s",
173+
msg.ID.String())
169174
}
170175

171176
return nil

rfqmsg/accept.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func NewIncomingAcceptFromWire(wireMsg WireMessage,
223223
request, found := sessionLookup(msgData.ID.Val)
224224
if !found {
225225
return nil, fmt.Errorf("no outgoing request found for "+
226-
"incoming accept message: %s", msgData.ID.Val)
226+
"incoming accept message: %s", msgData.ID.Val.String())
227227
}
228228

229229
// Use the corresponding request to determine the type of accept

0 commit comments

Comments
 (0)