Skip to content

Commit

Permalink
fix: add seperate mebibyte constant in x/blob/ante/blob_share_decorat…
Browse files Browse the repository at this point in the history
…or_test.go
  • Loading branch information
ZwangaMukwevho committed Jan 15, 2025
1 parent fbbd173 commit 6116a94
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions x/blob/ante/blob_share_decorator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

const (
squareSize = 64
mebibyte = 1_048_576 // bytes
)

func TestBlobShareDecorator(t *testing.T) {
Expand All @@ -41,7 +42,7 @@ func TestBlobShareDecorator(t *testing.T) {
{
name: "want no error if appVersion v1 and 8 MiB blob",
blobsPerPFB: 1,
blobSize: 8 * testnode.Mebibyte,
blobSize: 8 * mebibyte,
appVersion: v1.Version,
},
{
Expand All @@ -53,13 +54,13 @@ func TestBlobShareDecorator(t *testing.T) {
{
name: "PFB with 1 blob that is 1 MiB",
blobsPerPFB: 1,
blobSize: 1 * testnode.Mebibyte,
blobSize: 1 * mebibyte,
appVersion: v2.Version,
},
{
name: "PFB with 1 blob that is 2 MiB",
blobsPerPFB: 1,
blobSize: 2 * testnode.Mebibyte,
blobSize: 2 * mebibyte,
appVersion: v2.Version,
// This test case should return an error because a square size of 64
// has exactly 2 MiB of total capacity so the total blob capacity
Expand All @@ -75,7 +76,7 @@ func TestBlobShareDecorator(t *testing.T) {
{
name: "PFB with 2 blobs that are 1 MiB each",
blobsPerPFB: 2,
blobSize: 1 * testnode.Mebibyte,
blobSize: 1 * mebibyte,
appVersion: v2.Version,
// This test case should return an error for the same reason a
// single blob that is 2 MiB returns an error.
Expand Down

0 comments on commit 6116a94

Please sign in to comment.