diff --git a/p2p_beef_tx.go b/p2p_beef_tx.go index 2c0fd00..7e6d0f2 100644 --- a/p2p_beef_tx.go +++ b/p2p_beef_tx.go @@ -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") }