Skip to content

Commit

Permalink
chore: make golines (#649)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 authored Jun 5, 2024
1 parent f52d634 commit 85c6b0b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions protocol/chainsync/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ func (c *Client) GetAvailableBlockRange(
case firstBlock := <-firstBlockChan:
firstBlockChan = nil
if firstBlock.error != nil {
return start, end, fmt.Errorf("failed to get first block: %w", firstBlock.error)
return start, end, fmt.Errorf(
"failed to get first block: %w",
firstBlock.error,
)
}
start = firstBlock.point
case <-c.readyForNextBlockChan:
Expand Down Expand Up @@ -416,7 +419,9 @@ func (c *Client) wantIntersectFound() (<-chan clientPointResult, func()) {
}
}

func (c *Client) requestFindIntersect(intersectPoints []common.Point) clientPointResult {
func (c *Client) requestFindIntersect(
intersectPoints []common.Point,
) clientPointResult {
resultChan, cancel := c.wantIntersectFound()
msg := NewMsgFindIntersect(intersectPoints)
if err := c.SendMessage(msg); err != nil {
Expand Down Expand Up @@ -445,7 +450,8 @@ func (c *Client) handleRollForward(msgGeneric protocol.Message) error {
return nil
}
}()
if firstBlockChan == nil && (c.config == nil || c.config.RollForwardFunc == nil) {
if firstBlockChan == nil &&
(c.config == nil || c.config.RollForwardFunc == nil) {
return fmt.Errorf(
"received chain-sync RollForward message but no callback function is defined",
)
Expand Down

0 comments on commit 85c6b0b

Please sign in to comment.