Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Jul 18, 2024
1 parent d05e003 commit 558ea5d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func TestBuilderFindTxShareRange(t *testing.T) {
var lastEnd int
for idx, tx := range blockTxs {
blobTx, isBlobTx, err := share.UnmarshalBlobTx(tx)
require.NoError(t, err)
if isBlobTx {
require.NoError(t, err)
tx = blobTx.Tx
}
shareRange, err := builder.FindTxShareRange(idx)
Expand Down
2 changes: 1 addition & 1 deletion share/blob_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func UnmarshalBlobTx(tx []byte) (*BlobTx, bool, error) {
}
}
return &BlobTx{
Tx: tx,
Tx: bTx.Tx,
Blobs: blobs,
}, true, nil
}
Expand Down
2 changes: 1 addition & 1 deletion share/parse_compact_shares.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func validateShareVersions(shares []Share, supportedShareVersions []uint8) error
func parseRawData(rawData []byte) (units [][]byte, err error) {
units = make([][]byte, 0)
for {
actualData, unitLen, err := ParseDelimiter(rawData)
actualData, unitLen, err := parseDelimiter(rawData)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion share/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func zeroPadIfNecessary(share []byte, width int) (padded []byte, bytesOfPadding
// in compact shares where units (i.e. a transaction) are prefixed with a length
// delimiter that is encoded as a varint. Input should not contain the namespace
// ID or info byte of a share.
func ParseDelimiter(input []byte) (inputWithoutLenDelimiter []byte, unitLen uint64, err error) {
func parseDelimiter(input []byte) (inputWithoutLenDelimiter []byte, unitLen uint64, err error) {
if len(input) == 0 {
return input, 0, nil
}
Expand Down
2 changes: 1 addition & 1 deletion share/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestParseDelimiter(t *testing.T) {
if err != nil {
panic(err)
}
res, txLen, err := ParseDelimiter(input)
res, txLen, err := parseDelimiter(input)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 558ea5d

Please sign in to comment.