Skip to content

Commit fa62f49

Browse files
committed
Rename block number to block height
For Bitcoin it seems more common to use the name `block height` over the `block number`.
1 parent 1a53071 commit fa62f49

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

pkg/bitcoin/chain.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ type Chain interface {
2020
// rejected eventually.
2121
BroadcastTransaction(transaction *Transaction) error
2222

23-
// GetLatestBlockNumber gets the height of the latest block (tip). If the
23+
// GetLatestBlockHeight gets the height of the latest block (tip). If the
2424
// latest block was not determined, this function returns an error.
25-
GetLatestBlockNumber() (uint, error)
25+
GetLatestBlockHeight() (uint, error)
2626

27-
// GetBlockHeader gets the block header for the given block number. If the
28-
// block with the given number was not found on the chain, this function
27+
// GetBlockHeader gets the block header for the given block height. If the
28+
// block with the given height was not found on the chain, this function
2929
// returns an error.
30-
GetBlockHeader(blockNumber uint) (*BlockHeader, error)
30+
GetBlockHeader(blockHeight uint) (*BlockHeader, error)
3131
}

pkg/bitcoin/electrum/electrum.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ func (c *Client) BroadcastTransaction(
2727
panic("not implemented")
2828
}
2929

30-
func (c *Client) GetLatestBlockNumber() (uint, error) {
30+
func (c *Client) GetLatestBlockHeight() (uint, error) {
3131
// TODO: Implementation.
3232
panic("not implemented")
3333
}
3434

3535
func (c *Client) GetBlockHeader(
36-
blockNumber uint,
36+
blockHeight uint,
3737
) (*bitcoin.BlockHeader, error) {
3838
// TODO: Implementation.
3939
panic("not implemented")

0 commit comments

Comments
 (0)