Skip to content

Commit 59c7df4

Browse files
authored
fix: debug logging for node-to-node clients (#740)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 285b4ef commit 59c7df4

File tree

7 files changed

+68
-33
lines changed

7 files changed

+68
-33
lines changed

protocol/blockfetch/client.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
8282
func (c *Client) Start() {
8383
c.onceStart.Do(func() {
8484
c.Protocol.Logger().
85-
Debug(fmt.Sprintf("starting protocol: %s", ProtocolName))
85+
Debug(fmt.Sprintf("%s: starting protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
8686
c.Protocol.Start()
8787
// Start goroutine to cleanup resources on protocol shutdown
8888
go func() {
@@ -97,7 +97,7 @@ func (c *Client) Stop() error {
9797
var err error
9898
c.onceStop.Do(func() {
9999
c.Protocol.Logger().
100-
Debug(fmt.Sprintf("stopping protocol: %s", ProtocolName))
100+
Debug(fmt.Sprintf("%s: stopping protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
101101
msg := NewMsgClientDone()
102102
err = c.SendMessage(msg)
103103
})
@@ -107,7 +107,7 @@ func (c *Client) Stop() error {
107107
// GetBlockRange starts an async process to fetch all blocks in the specified range (inclusive)
108108
func (c *Client) GetBlockRange(start common.Point, end common.Point) error {
109109
c.Protocol.Logger().
110-
Debug(fmt.Sprintf("client called %s GetBlockRange(start: %+v, end: %+v)", ProtocolName, start, end))
110+
Debug(fmt.Sprintf("%s: client called GetBlockRange(start: {Slot: %d, Hash: %x}, end: {Slot: %d, Hash: %x})", ProtocolName, start.Slot, start.Hash, end.Slot, end.Hash))
111111
c.busyMutex.Lock()
112112
c.blockUseCallback = true
113113
msg := NewMsgRequestRange(start, end)
@@ -129,7 +129,7 @@ func (c *Client) GetBlockRange(start common.Point, end common.Point) error {
129129
// GetBlock requests and returns a single block specified by the provided point
130130
func (c *Client) GetBlock(point common.Point) (ledger.Block, error) {
131131
c.Protocol.Logger().
132-
Debug(fmt.Sprintf("client called %s GetBlock(point: %+v)", ProtocolName, point))
132+
Debug(fmt.Sprintf("%s: client called GetBlock(point: {Slot: %d, Hash: %x})", ProtocolName, point.Slot, point.Hash))
133133
c.busyMutex.Lock()
134134
c.blockUseCallback = false
135135
msg := NewMsgRequestRange(point, point)
@@ -153,8 +153,6 @@ func (c *Client) GetBlock(point common.Point) (ledger.Block, error) {
153153
}
154154

155155
func (c *Client) messageHandler(msg protocol.Message) error {
156-
c.Protocol.Logger().
157-
Debug(fmt.Sprintf("handling client message for %s", ProtocolName))
158156
var err error
159157
switch msg.Type() {
160158
case MessageTypeStartBatch:
@@ -177,22 +175,22 @@ func (c *Client) messageHandler(msg protocol.Message) error {
177175

178176
func (c *Client) handleStartBatch() error {
179177
c.Protocol.Logger().
180-
Debug(fmt.Sprintf("handling client start batch for %s", ProtocolName))
178+
Debug(fmt.Sprintf("%s: client start batch for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
181179
c.startBatchResultChan <- nil
182180
return nil
183181
}
184182

185183
func (c *Client) handleNoBlocks() error {
186184
c.Protocol.Logger().
187-
Debug(fmt.Sprintf("handling client no blocks found for %s", ProtocolName))
185+
Debug(fmt.Sprintf("%s: client no blocks found for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
188186
err := fmt.Errorf("block(s) not found")
189187
c.startBatchResultChan <- err
190188
return nil
191189
}
192190

193191
func (c *Client) handleBlock(msgGeneric protocol.Message) error {
194192
c.Protocol.Logger().
195-
Debug(fmt.Sprintf("handling client block found for %s", ProtocolName))
193+
Debug(fmt.Sprintf("%s: client block found for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
196194
msg := msgGeneric.(*MsgBlock)
197195
// Decode only enough to get the block type value
198196
var wrappedBlock WrappedBlock
@@ -219,7 +217,7 @@ func (c *Client) handleBlock(msgGeneric protocol.Message) error {
219217

220218
func (c *Client) handleBatchDone() error {
221219
c.Protocol.Logger().
222-
Debug(fmt.Sprintf("handling client batch done for %s", ProtocolName))
220+
Debug(fmt.Sprintf("%s: client batch done for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
223221
c.busyMutex.Unlock()
224222
return nil
225223
}

protocol/chainsync/client.go

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func NewClient(
117117
func (c *Client) Start() {
118118
c.onceStart.Do(func() {
119119
c.Protocol.Logger().
120-
Debug(fmt.Sprintf("starting protocol: %s", ProtocolName))
120+
Debug(fmt.Sprintf("%s: starting protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
121121
c.Protocol.Start()
122122
// Start goroutine to cleanup resources on protocol shutdown
123123
go func() {
@@ -132,7 +132,7 @@ func (c *Client) Stop() error {
132132
var err error
133133
c.onceStop.Do(func() {
134134
c.Protocol.Logger().
135-
Debug(fmt.Sprintf("stopping protocol: %s", ProtocolName))
135+
Debug(fmt.Sprintf("%s: stopping protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
136136
c.busyMutex.Lock()
137137
defer c.busyMutex.Unlock()
138138
msg := NewMsgDone()
@@ -146,7 +146,7 @@ func (c *Client) Stop() error {
146146
// GetCurrentTip returns the current chain tip
147147
func (c *Client) GetCurrentTip() (*Tip, error) {
148148
c.Protocol.Logger().
149-
Debug(fmt.Sprintf("client called %s GetCurrentTip()", ProtocolName))
149+
Debug(fmt.Sprintf("%s: client %+v called GetCurrentTip()", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
150150
done := atomic.Bool{}
151151
requestResultChan := make(chan Tip, 1)
152152
requestErrorChan := make(chan error, 1)
@@ -185,10 +185,14 @@ func (c *Client) GetCurrentTip() (*Tip, error) {
185185
// The request is being handled by another request, wait for the result.
186186
waitingForCurrentTipChan = nil
187187
case tip := <-waitingResultChan:
188+
c.Protocol.Logger().
189+
Debug(fmt.Sprintf("%s: returning tip results {Slot: %d, Hash: %x, BlockNumber: %d} to %+v", ProtocolName, tip.Point.Slot, tip.Point.Hash, tip.BlockNumber, c.callbackContext.ConnectionId.RemoteAddr))
188190
// The result from the other request is ready.
189191
done.Store(true)
190192
return &tip, nil
191193
case tip := <-requestResultChan:
194+
c.Protocol.Logger().
195+
Debug(fmt.Sprintf("%s: returning tip results {Slot: %d, Hash: %x, BlockNumber: %d} to %+v", ProtocolName, tip.Point.Slot, tip.Point.Hash, tip.BlockNumber, c.callbackContext.ConnectionId.RemoteAddr))
192196
// If waitingForCurrentTipChan is full, the for loop that empties it might finish the
193197
// loop before the select statement that writes to it is triggered. For that reason we
194198
// require requestResultChan here.
@@ -204,15 +208,25 @@ func (c *Client) GetCurrentTip() (*Tip, error) {
204208
func (c *Client) GetAvailableBlockRange(
205209
intersectPoints []common.Point,
206210
) (common.Point, common.Point, error) {
207-
c.Protocol.Logger().
208-
Debug(fmt.Sprintf("client called %s GetAvailableBlockRange(intersectPoints: %+v)", ProtocolName, intersectPoints))
209211
c.busyMutex.Lock()
210212
defer c.busyMutex.Unlock()
211213

212214
// Use origin if no intersect points were specified
213215
if len(intersectPoints) == 0 {
214216
intersectPoints = []common.Point{common.NewPointOrigin()}
215217
}
218+
switch len(intersectPoints) {
219+
case 1:
220+
c.Protocol.Logger().
221+
Debug(fmt.Sprintf("%s: client %+v called GetAvailableBlockRange(intersectPoints: []{Slot: %d, Hash: %x})", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints[0].Slot, intersectPoints[0].Hash))
222+
case 2:
223+
c.Protocol.Logger().
224+
Debug(fmt.Sprintf("%s: client %+v called GetAvailableBlockRange(intersectPoints: []{Slot: %d, Hash: %x},{Slot: %d, Hash: %x})", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints[0].Slot, intersectPoints[0].Hash, intersectPoints[1].Slot, intersectPoints[1].Hash))
225+
default:
226+
c.Protocol.Logger().
227+
Debug(fmt.Sprintf("%s: client %+v called GetAvailableBlockRange(intersectPoints: %+v)", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints))
228+
}
229+
216230
// Find our chain intersection
217231
result := c.requestFindIntersect(intersectPoints)
218232
if result.error != nil {
@@ -279,14 +293,24 @@ func (c *Client) GetAvailableBlockRange(
279293
// Sync begins a chain-sync operation using the provided intersect point(s). Incoming blocks will be delivered
280294
// via the RollForward callback function specified in the protocol config
281295
func (c *Client) Sync(intersectPoints []common.Point) error {
282-
c.Protocol.Logger().
283-
Debug(fmt.Sprintf("client called %s Sync(intersectPoints: %+v)", ProtocolName, intersectPoints))
284296
c.busyMutex.Lock()
285297
defer c.busyMutex.Unlock()
298+
286299
// Use origin if no intersect points were specified
287300
if len(intersectPoints) == 0 {
288301
intersectPoints = []common.Point{common.NewPointOrigin()}
289302
}
303+
switch len(intersectPoints) {
304+
case 1:
305+
c.Protocol.Logger().
306+
Debug(fmt.Sprintf("%s: client %+v called Sync(intersectPoints: []{Slot: %d, Hash: %x})", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints[0].Slot, intersectPoints[0].Hash))
307+
case 2:
308+
c.Protocol.Logger().
309+
Debug(fmt.Sprintf("%s: client %+v called Sync(intersectPoints: []{Slot: %d, Hash: %x},{Slot: %d, Hash: %x})", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints[0].Slot, intersectPoints[0].Hash, intersectPoints[1].Slot, intersectPoints[1].Hash))
310+
default:
311+
c.Protocol.Logger().
312+
Debug(fmt.Sprintf("%s: client %+v called Sync(intersectPoints: %+v)", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, intersectPoints))
313+
}
290314

291315
intersectResultChan, cancel := c.wantIntersectFound()
292316
msg := NewMsgFindIntersect(intersectPoints)
@@ -430,8 +454,6 @@ func (c *Client) requestFindIntersect(
430454
}
431455

432456
func (c *Client) messageHandler(msg protocol.Message) error {
433-
c.Protocol.Logger().
434-
Debug(fmt.Sprintf("handling client message for %s", ProtocolName))
435457
var err error
436458
switch msg.Type() {
437459
case MessageTypeAwaitReply:
@@ -456,13 +478,13 @@ func (c *Client) messageHandler(msg protocol.Message) error {
456478

457479
func (c *Client) handleAwaitReply() error {
458480
c.Protocol.Logger().
459-
Debug(fmt.Sprintf("handling client await reply for %s", ProtocolName))
481+
Debug(fmt.Sprintf("%s: client await reply for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
460482
return nil
461483
}
462484

463485
func (c *Client) handleRollForward(msgGeneric protocol.Message) error {
464486
c.Protocol.Logger().
465-
Debug(fmt.Sprintf("handling client roll forward for %s", ProtocolName))
487+
Debug(fmt.Sprintf("%s: client roll forward for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
466488
firstBlockChan := func() chan<- clientPointResult {
467489
select {
468490
case ch := <-c.wantFirstBlockChan:
@@ -572,7 +594,7 @@ func (c *Client) handleRollForward(msgGeneric protocol.Message) error {
572594

573595
func (c *Client) handleRollBackward(msg protocol.Message) error {
574596
c.Protocol.Logger().
575-
Debug(fmt.Sprintf("handling client roll backward for %s", ProtocolName))
597+
Debug(fmt.Sprintf("%s: client roll backward for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
576598
msgRollBackward := msg.(*MsgRollBackward)
577599
c.sendCurrentTip(msgRollBackward.Tip)
578600
if len(c.wantFirstBlockChan) == 0 {
@@ -599,7 +621,7 @@ func (c *Client) handleRollBackward(msg protocol.Message) error {
599621

600622
func (c *Client) handleIntersectFound(msg protocol.Message) error {
601623
c.Protocol.Logger().
602-
Debug(fmt.Sprintf("handling client intersect found for %s", ProtocolName))
624+
Debug(fmt.Sprintf("%s: client intersect found for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
603625
msgIntersectFound := msg.(*MsgIntersectFound)
604626
c.sendCurrentTip(msgIntersectFound.Tip)
605627

@@ -613,7 +635,7 @@ func (c *Client) handleIntersectFound(msg protocol.Message) error {
613635

614636
func (c *Client) handleIntersectNotFound(msgGeneric protocol.Message) error {
615637
c.Protocol.Logger().
616-
Debug(fmt.Sprintf("handling client intersect not found for %s", ProtocolName))
638+
Debug(fmt.Sprintf("%s: client intersect not found for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
617639
msgIntersectNotFound := msgGeneric.(*MsgIntersectNotFound)
618640
c.sendCurrentTip(msgIntersectNotFound.Tip)
619641

protocol/handshake/client.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
5757
ErrorChan: protoOptions.ErrorChan,
5858
Mode: protoOptions.Mode,
5959
Role: protocol.ProtocolRoleClient,
60-
MessageHandlerFunc: c.handleMessage,
60+
MessageHandlerFunc: c.messageHandler,
6161
MessageFromCborFunc: NewMsgFromCbor,
6262
StateMap: stateMap,
6363
InitialState: statePropose,
@@ -70,17 +70,15 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
7070
func (c *Client) Start() {
7171
c.onceStart.Do(func() {
7272
c.Protocol.Logger().
73-
Debug(fmt.Sprintf("starting protocol: %s", ProtocolName))
73+
Debug(fmt.Sprintf("%s: starting protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
7474
c.Protocol.Start()
7575
// Send our ProposeVersions message
7676
msg := NewMsgProposeVersions(c.config.ProtocolVersionMap)
7777
_ = c.SendMessage(msg)
7878
})
7979
}
8080

81-
func (c *Client) handleMessage(msg protocol.Message) error {
82-
c.Protocol.Logger().
83-
Debug(fmt.Sprintf("handling client message for %s", ProtocolName))
81+
func (c *Client) messageHandler(msg protocol.Message) error {
8482
var err error
8583
switch msg.Type() {
8684
case MessageTypeAcceptVersion:
@@ -99,7 +97,7 @@ func (c *Client) handleMessage(msg protocol.Message) error {
9997

10098
func (c *Client) handleAcceptVersion(msg protocol.Message) error {
10199
c.Protocol.Logger().
102-
Debug(fmt.Sprintf("handling client accept version for %s", ProtocolName))
100+
Debug(fmt.Sprintf("%s: client accept version for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
103101
if c.config.FinishedFunc == nil {
104102
return fmt.Errorf(
105103
"received handshake AcceptVersion message but no callback function is defined",
@@ -122,7 +120,7 @@ func (c *Client) handleAcceptVersion(msg protocol.Message) error {
122120

123121
func (c *Client) handleRefuse(msgGeneric protocol.Message) error {
124122
c.Protocol.Logger().
125-
Debug(fmt.Sprintf("handling client refuse for %s", ProtocolName))
123+
Debug(fmt.Sprintf("%s: client refuse for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
126124
msg := msgGeneric.(*MsgRefuse)
127125
var err error
128126
switch msg.Reason[0].(uint64) {

protocol/keepalive/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
5454
Name: ProtocolName,
5555
ProtocolId: ProtocolId,
5656
Muxer: protoOptions.Muxer,
57+
Logger: protoOptions.Logger,
5758
ErrorChan: protoOptions.ErrorChan,
5859
Mode: protoOptions.Mode,
5960
Role: protocol.ProtocolRoleClient,
@@ -68,6 +69,8 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
6869

6970
func (c *Client) Start() {
7071
c.onceStart.Do(func() {
72+
c.Protocol.Logger().
73+
Debug(fmt.Sprintf("%s: starting protocol for connection %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
7174
c.Protocol.Start()
7275
// Start goroutine to cleanup resources on protocol shutdown
7376
go func() {
@@ -119,6 +122,8 @@ func (c *Client) messageHandler(msg protocol.Message) error {
119122
}
120123

121124
func (c *Client) handleKeepAliveResponse(msgGeneric protocol.Message) error {
125+
c.Protocol.Logger().
126+
Debug(fmt.Sprintf("%s: client keepalive response for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
122127
msg := msgGeneric.(*MsgKeepAliveResponse)
123128
if msg.Cookie != c.config.Cookie {
124129
return fmt.Errorf(

protocol/peersharing/client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
5353
Name: ProtocolName,
5454
ProtocolId: ProtocolId,
5555
Muxer: protoOptions.Muxer,
56+
Logger: protoOptions.Logger,
5657
ErrorChan: protoOptions.ErrorChan,
5758
Mode: protoOptions.Mode,
5859
Role: protocol.ProtocolRoleClient,
@@ -66,6 +67,8 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
6667
}
6768

6869
func (c *Client) GetPeers(amount uint8) ([]PeerAddress, error) {
70+
c.Protocol.Logger().
71+
Debug(fmt.Sprintf("%s: client %+v called GetPeers(amount: %d)", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr, amount))
6972
msg := NewMsgShareRequest(amount)
7073
if err := c.SendMessage(msg); err != nil {
7174
return nil, err
@@ -78,6 +81,8 @@ func (c *Client) GetPeers(amount uint8) ([]PeerAddress, error) {
7881
}
7982

8083
func (c *Client) handleMessage(msg protocol.Message) error {
84+
c.Protocol.Logger().
85+
Debug(fmt.Sprintf("%s: client message for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
8186
var err error
8287
switch msg.Type() {
8388
case MessageTypeSharePeers:
@@ -93,6 +98,8 @@ func (c *Client) handleMessage(msg protocol.Message) error {
9398
}
9499

95100
func (c *Client) handleSharePeers(msg protocol.Message) error {
101+
c.Protocol.Logger().
102+
Debug(fmt.Sprintf("%s: client share peers for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
96103
msgSharePeers := msg.(*MsgSharePeers)
97104
c.sharePeersChan <- msgSharePeers.PeerAddresses
98105
return nil

protocol/protocol.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ func New(config ProtocolConfig) *Protocol {
121121
func (p *Protocol) Start() {
122122
p.onceStart.Do(func() {
123123
// Register protocol with muxer
124-
p.Logger().Debug("registering protocol with muxer")
125124
muxerProtocolRole := muxer.ProtocolRoleInitiator
126125
if p.config.Role == ProtocolRoleServer {
127126
muxerProtocolRole = muxer.ProtocolRoleResponder
@@ -160,7 +159,6 @@ func (p *Protocol) Start() {
160159
func (p *Protocol) Stop() {
161160
p.onceStop.Do(func() {
162161
// Unregister protocol from muxer
163-
p.Logger().Debug("unregistering protocol with muxer")
164162
muxerProtocolRole := muxer.ProtocolRoleInitiator
165163
if p.config.Role == ProtocolRoleServer {
166164
muxerProtocolRole = muxer.ProtocolRoleResponder

protocol/txsubmission/client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
5353
Name: ProtocolName,
5454
ProtocolId: ProtocolId,
5555
Muxer: protoOptions.Muxer,
56+
Logger: protoOptions.Logger,
5657
ErrorChan: protoOptions.ErrorChan,
5758
Mode: protoOptions.Mode,
5859
Role: protocol.ProtocolRoleClient,
@@ -75,6 +76,8 @@ func (c *Client) Init() {
7576
}
7677

7778
func (c *Client) messageHandler(msg protocol.Message) error {
79+
c.Protocol.Logger().
80+
Debug(fmt.Sprintf("%s: client message for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
7881
var err error
7982
switch msg.Type() {
8083
case MessageTypeRequestTxIds:
@@ -92,6 +95,8 @@ func (c *Client) messageHandler(msg protocol.Message) error {
9295
}
9396

9497
func (c *Client) handleRequestTxIds(msg protocol.Message) error {
98+
c.Protocol.Logger().
99+
Debug(fmt.Sprintf("%s: client request tx ids for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
95100
if c.config.RequestTxIdsFunc == nil {
96101
return fmt.Errorf(
97102
"received tx-submission RequestTxIds message but no callback function is defined",
@@ -116,6 +121,8 @@ func (c *Client) handleRequestTxIds(msg protocol.Message) error {
116121
}
117122

118123
func (c *Client) handleRequestTxs(msg protocol.Message) error {
124+
c.Protocol.Logger().
125+
Debug(fmt.Sprintf("%s: client request txs for %+v", ProtocolName, c.callbackContext.ConnectionId.RemoteAddr))
119126
if c.config.RequestTxsFunc == nil {
120127
return fmt.Errorf(
121128
"received tx-submission RequestTxs message but no callback function is defined",

0 commit comments

Comments
 (0)