Skip to content

Commit

Permalink
fix: changes bb variable name to more descriptive - hex bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
wregulski committed Sep 22, 2023
1 parent 7e56bbf commit b93fb90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions p2p_beef_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ func DecodeTransactionsWithPathIndexes(bytes []byte) ([]TxData, error) {
return transactions, nil
}

func extractHeight(bb []byte) (int, int, error) {
if len(bb) < 1 {
func extractHeight(hexBytes []byte) (int, int, error) {
if len(hexBytes) < 1 {
return 0, 0, errors.New("insufficient bytes to extract height")
}
height := int(bb[0])
height := int(hexBytes[0])
if height > 64 {
return 0, 0, errors.New("height exceeds maximum allowed value of 64")
}
Expand Down

0 comments on commit b93fb90

Please sign in to comment.