Skip to content

Commit 03f0b9e

Browse files
authored
Merge pull request #431 from blinklabs-io/chore/remove-is-response
chore: remove unused isResponse param in message handlers
2 parents ded3d7b + c3a89ef commit 03f0b9e

File tree

19 files changed

+22
-25
lines changed

19 files changed

+22
-25
lines changed

protocol/blockfetch/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (c *Client) GetBlock(point common.Point) (ledger.Block, error) {
124124
return block, nil
125125
}
126126

127-
func (c *Client) messageHandler(msg protocol.Message, isResponse bool) error {
127+
func (c *Client) messageHandler(msg protocol.Message) error {
128128
var err error
129129
switch msg.Type() {
130130
case MessageTypeStartBatch:

protocol/blockfetch/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
4444
return s
4545
}
4646

47-
func (s *Server) messageHandler(msg protocol.Message, isResponse bool) error {
47+
func (s *Server) messageHandler(msg protocol.Message) error {
4848
var err error
4949
// TODO: add cases for messages from client
5050
switch msg.Type() {

protocol/chainsync/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
9696
return c
9797
}
9898

99-
func (c *Client) messageHandler(msg protocol.Message, isResponse bool) error {
99+
func (c *Client) messageHandler(msg protocol.Message) error {
100100
var err error
101101
switch msg.Type() {
102102
case MessageTypeAwaitReply:

protocol/chainsync/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
5454
return s
5555
}
5656

57-
func (s *Server) messageHandler(msg protocol.Message, isResponse bool) error {
57+
func (s *Server) messageHandler(msg protocol.Message) error {
5858
var err error
5959
switch msg.Type() {
6060
case MessageTypeRequestNext:

protocol/handshake/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (c *Client) Start() {
7070
})
7171
}
7272

73-
func (c *Client) handleMessage(msg protocol.Message, isResponse bool) error {
73+
func (c *Client) handleMessage(msg protocol.Message) error {
7474
var err error
7575
switch msg.Type() {
7676
case MessageTypeAcceptVersion:

protocol/handshake/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
4747
return s
4848
}
4949

50-
func (s *Server) handleMessage(msg protocol.Message, isResponse bool) error {
50+
func (s *Server) handleMessage(msg protocol.Message) error {
5151
var err error
5252
switch msg.Type() {
5353
case MessageTypeProposeVersions:

protocol/keepalive/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (c *Client) startTimer() {
8686
})
8787
}
8888

89-
func (c *Client) messageHandler(msg protocol.Message, isResponse bool) error {
89+
func (c *Client) messageHandler(msg protocol.Message) error {
9090
var err error
9191
switch msg.Type() {
9292
case MessageTypeKeepAliveResponse:

protocol/keepalive/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
4444
return s
4545
}
4646

47-
func (s *Server) messageHandler(msg protocol.Message, isResponse bool) error {
47+
func (s *Server) messageHandler(msg protocol.Message) error {
4848
var err error
4949
switch msg.Type() {
5050
case MessageTypeKeepAlive:

protocol/localstatequery/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client {
9191
return c
9292
}
9393

94-
func (c *Client) messageHandler(msg protocol.Message, isResponse bool) error {
94+
func (c *Client) messageHandler(msg protocol.Message) error {
9595
var err error
9696
switch msg.Type() {
9797
case MessageTypeAcquired:

protocol/localstatequery/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
5858
return s
5959
}
6060

61-
func (s *Server) messageHandler(msg protocol.Message, isResponse bool) error {
61+
func (s *Server) messageHandler(msg protocol.Message) error {
6262
var err error
6363
switch msg.Type() {
6464
case MessageTypeAcquire:

0 commit comments

Comments
 (0)