Skip to content

Commit

Permalink
fix: resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Mar 6, 2024
1 parent 0bf6dfb commit 60a7784
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions pkg/proof/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,40 +224,6 @@ func TestNewShareInclusionProof(t *testing.T) {
})
}
}
<<<<<<< HEAD
=======

// TestAllSharesInclusionProof creates a proof for all shares in the data
// square. Since we can't prove multiple namespaces at the moment, all the
// shares use the same namespace.
func TestAllSharesInclusionProof(t *testing.T) {
txs := testfactory.GenerateRandomTxs(243, 500)

dataSquare, err := square.Construct(txs.ToSliceOfBytes(), appconsts.SquareSizeUpperBound(appconsts.LatestVersion), appconsts.SubtreeRootThreshold(appconsts.LatestVersion))
require.NoError(t, err)
assert.Equal(t, 256, len(dataSquare))

// erasure the data square which we use to create the data root.
eds, err := da.ExtendShares(shares.ToBytes(dataSquare))
require.NoError(t, err)

// create the new data root by creating the data availability header (merkle
// roots of each row and col of the erasure data).
dah, err := da.NewDataAvailabilityHeader(eds)
require.NoError(t, err)
dataRoot := dah.Hash()

actualNamespace, err := proof.ParseNamespace(dataSquare, 0, 256)
require.NoError(t, err)
require.Equal(t, appns.TxNamespace, actualNamespace)
proof, err := proof.NewShareInclusionProof(
dataSquare,
appns.TxNamespace,
shares.NewRange(0, 256),
)
require.NoError(t, err)
assert.NoError(t, proof.Validate(dataRoot))
}

// Ensure that we reject negative index values and avoid overflows.
// https://github.com/celestiaorg/celestia-app/issues/3140
Expand All @@ -276,4 +242,3 @@ func TestQueryTxInclusionProofRejectsNegativeValues(t *testing.T) {
t.Fatal("no rawProof expected")
}
}
>>>>>>> adb7a570 (fix(pkg/proof): reject negative indices in QueryTxInclusionProof (#3141))

0 comments on commit 60a7784

Please sign in to comment.