Skip to content

Commit

Permalink
remve getheight
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Nov 25, 2024
1 parent 7ac43e6 commit e856e1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions p2p/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ func (c *Client) SaveBlock(ctx context.Context, block *types.Block, blockBytes [
if err != nil {
return fmt.Errorf("blocksync add block: %w", err)
}
_, err = c.store.SaveBlockCid(block.Height(), cid, nil)
_, err = c.store.SaveBlockCid(block.Header.Height, cid, nil)
if err != nil {
return fmt.Errorf("blocksync store block id: %w", err)
}
err = c.AdvertiseBlockIdToDHT(ctx, block.Height(), block.GetRevision(), cid)
err = c.AdvertiseBlockIdToDHT(ctx, block.Header.Height, block.GetRevision(), cid)
if err != nil {
c.logger.Debug("block-sync advertise block", "error", err)
}
Expand Down
4 changes: 0 additions & 4 deletions types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ func (b Block) SizeBytes() int {
return b.ToProto().Size()
}

func (b *Block) Height() uint64 {
return b.Header.Height
}

func (b *Block) GetRevision() uint64 {
return b.Header.Version.App
}
Expand Down

0 comments on commit e856e1d

Please sign in to comment.