Skip to content

Commit

Permalink
Fix NPE on Optimism test
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyknox committed Jul 21, 2024
1 parent 0d35ee4 commit 98c0585
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions e2e/optimism_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewL2PlasmaDA(t actions.Testing, daHost string, altDA bool) *L2PlasmaDA {

var storage *plasma.DAClient
if !altDA {
storage = plasma.NewDAClient(daHost, true, true)
storage = plasma.NewDAClient(daHost, true, true)
} else {
storage = plasma.NewDAClient(daHost, false, false)
}
Expand All @@ -78,7 +78,7 @@ func NewL2PlasmaDA(t actions.Testing, daHost string, altDA bool) *L2PlasmaDA {
require.NoError(t, err)

if altDA {
plasmaCfg.CommitmentType = plasma.GenericCommitmentType
plasmaCfg.CommitmentType = plasma.GenericCommitmentType
} else {
plasmaCfg.CommitmentType = plasma.Keccak256CommitmentType
}
Expand Down Expand Up @@ -116,7 +116,6 @@ func (a *L2PlasmaDA) ActL1Finalized(t actions.Testing) {
a.sequencer.ActL1FinalizedSignal(t)
}


func TestOptimismKeccak256Commitment(gt *testing.T) {
if !runIntegrationTests && !runTestnetIntegrationTests {
gt.Skip("Skipping test as INTEGRATION or TESTNET env var not set")
Expand Down Expand Up @@ -170,7 +169,6 @@ func TestOptimismKeccak256Commitment(gt *testing.T) {
require.Equal(t, 1, stat.Reads)
}


func TestOptimismAltDACommitment(gt *testing.T) {
if !runIntegrationTests && !runTestnetIntegrationTests {
gt.Skip("Skipping test as INTEGRATION or TESTNET env var not set")
Expand Down Expand Up @@ -218,8 +216,10 @@ func TestOptimismAltDACommitment(gt *testing.T) {
op_stack.ActL1Finalized(t)

// assert that EigenDA proxy's was written and read from
stat := proxyTS.Server.GetMemStats()

require.Equal(t, 1, stat.Entries)
require.Equal(t, 1, stat.Reads)
if useMemory() {
stat := proxyTS.Server.GetMemStats()
require.Equal(t, 1, stat.Entries)
require.Equal(t, 1, stat.Reads)
}
}

0 comments on commit 98c0585

Please sign in to comment.