ax(node): replace prose comment with usage example in NewController
AX-2: comments must show concrete usage, not restate what the code does. The "Register message handler for responses" prose comment was replaced with a usage-example comment that shows the actual call pattern. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
a96af6adb2
commit
956f8de643
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ func NewController(node *NodeManager, peers *PeerRegistry, transport *Transport)
|
|||
pendingRequests: make(map[string]chan *Message),
|
||||
}
|
||||
|
||||
// Register message handler for responses
|
||||
// transport.OnMessage(controller.handleResponse) // registered in NewController; routes replies to pending request channels
|
||||
transport.OnMessage(controller.handleResponse)
|
||||
|
||||
return controller
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue