Skip to content

Commit

Permalink
prune blocksync fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Sep 14, 2024
1 parent 281b084 commit 5e6de6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions p2p/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ func (c *Client) RemoveBlocks(ctx context.Context, from, to uint64) error {
}

for h := from; h < to; h++ {

cid, err := c.store.LoadBlockCid(h)
if err != nil {
return fmt.Errorf("load block id from store %d: %w", h, err)
c.logger.Error("load blocksync block id from store", "height", h, "error", err)
continue
}
err = c.blocksync.DeleteBlock(ctx, cid)
if err != nil {
return fmt.Errorf("remove block height %d: %w", h, err)
c.logger.Error("remove blocksync block", "height", h, "err", err)
}
}
return nil
Expand Down

0 comments on commit 5e6de6f

Please sign in to comment.