Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[epociask/no-issue-withdrawal-enforce] Fixing lint erors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethen Pociask committed Jun 28, 2023
1 parent 95c62c1 commit 5a59492
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ func CreateSysTestSuite(t *testing.T) *SysTestSuite {
Cfg: &cfg,
App: pess,
Close: func() {
kill()
sys.Close()
},
AppCfg: appCfg,
Expand Down
12 changes: 2 additions & 10 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ import (
"github.com/base-org/pessimism/internal/api/models"
)

func calcGasFees(gasUsed uint64, gasTipCap *big.Int, gasFeeCap *big.Int, baseFee *big.Int) *big.Int {
x := new(big.Int).Add(gasTipCap, baseFee)
// If tip + basefee > gas fee cap, clamp it to the gas fee cap
if x.Cmp(gasFeeCap) > 0 {
x = gasFeeCap
}
return x.Mul(x, new(big.Int).SetUint64(gasUsed))
}

// Test_Balance_Enforcement ... Tests the E2E flow of a single
// balance enforcement invariant session on L2 network.
func Test_Balance_Enforcement(t *testing.T) {
Expand Down Expand Up @@ -241,6 +232,7 @@ func Test_Withdrawal_Enforcement(t *testing.T) {

// Deploy a dummy L2ToL1 message passer for testing.
fakeAddr, tx, _, err := bindings.DeployL2ToL1MessagePasser(transactor.L2Opts, l2Seq)
assert.NoError(t, err, "error deploying message passer on L2")

_, err = e2e.WaitForTransaction(tx.Hash(), l2Seq, txTimeoutDuration)

Expand Down Expand Up @@ -346,7 +338,7 @@ func Test_Withdrawal_Enforcement(t *testing.T) {
assert.Nil(t, err, "withdrawal should successfully prove")

// Wait for the transaction to appear in L1
receipt, err = e2e.WaitForTransaction(tx.Hash(), l1Client, txTimeoutDuration)
_, err = e2e.WaitForTransaction(tx.Hash(), l1Client, txTimeoutDuration)
assert.Nil(t, err, "withdrawal finalized on L1")
time.Sleep(1 * time.Second)

Expand Down
1 change: 0 additions & 1 deletion internal/engine/addressing.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (am *addressingMap) GetSUUIDsByPair(address common.Address, pUUID core.PUUI

// Insert ... Inserts a new entry into the addressing map
func (am *addressingMap) Insert(addr common.Address, pUUID core.PUUID, sUUID core.SUUID) error {

if _, found := am.m[addr]; !found {
am.m[addr] = make(map[core.PUUID][]core.SUUID)
am.m[addr][pUUID] = []core.SUUID{sUUID}
Expand Down
2 changes: 2 additions & 0 deletions internal/engine/addressing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ func Test_GetSUUIDsByPair(t *testing.T) {
assert.NoError(t, err, "should not error")

ids, err = am.GetSUUIDsByPair(address, testPUUID)
assert.NoError(t, err, "should not error")
assert.Len(t, ids, 2, "should have length of 2")
assert.Contains(t, ids, sUUID, "should contain sUUID")
assert.Contains(t, ids, sUUID2, "should contain sUUID2")

// Test for not found
ids, err = am.GetSUUIDsByPair(address, core.NilPUUID())
assert.Error(t, err, "should error")
assert.Empty(t, ids, "should be empty")
}
1 change: 0 additions & 1 deletion internal/engine/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ func (em *engineManager) executeAddressInvariants(ctx context.Context, data core
}

em.executeInvariant(ctx, data, inv)

}
}

Expand Down

0 comments on commit 5a59492

Please sign in to comment.