Skip to content

Commit

Permalink
Apply suggestions from Vegards' code review
Browse files Browse the repository at this point in the history
Co-authored-by: Vegard Stikbakke <vegard.stikbakke@gmail.com>
  • Loading branch information
msf and vegarsti committed Jun 4, 2024
1 parent 80b45e2 commit dfc27db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/jsonrpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type BlockchainClient interface {

// SendBlocks sends blocks from startBlockNumber to endBlockNumber to outChan, inclusive.
// If endBlockNumber is -1, it sends blocks from startBlockNumber to the tip of the chain
// it will run continueously until the context is cancelled
// it will run continuously until the context is cancelled
SendBlocks(ctx context.Context, outChan chan models.RPCBlock, startBlockNumber, endBlockNumber int64) error

Close() error
Expand Down Expand Up @@ -78,7 +78,7 @@ func (c *rpcClient) LatestBlockNumber() (int64, error) {
return hexutils.IntFromHex(resp.Result)
}

// getResponseBody sends a request to the OpStack server and returns the response body
// getResponseBody sends a request to the server and returns the response body
func (c *rpcClient) getResponseBody(
ctx context.Context, method string, params interface{}, output *bytes.Buffer,
) error {
Expand Down
1 change: 0 additions & 1 deletion client/jsonrpc/opstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (c *OpStackClient) BlockByNumber(ctx context.Context, blockNumber int64) (m
group, ctx := errgroup.WithContext(ctx)
results := make([]*bytes.Buffer, len(methods))
for i, method := range methods {

results[i] = c.bufPool.Get().(*bytes.Buffer)
defer c.bufPool.Put(results[i])

Expand Down

0 comments on commit dfc27db

Please sign in to comment.