Skip to content

Commit

Permalink
Remove some unused varialbes (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
eljobe authored Sep 17, 2024
1 parent 8720acb commit a12424d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
7 changes: 2 additions & 5 deletions assertions/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ func TestFastConfirmation(t *testing.T) {

ctx, cancel := context.WithTimeout(ctx, time.Second)
defer cancel()
hash := protocol.AssertionHash{Hash: posted.Unwrap().AssertionHash}
expectAssertionConfirmed(t, ctx, setup.Backend, aliceChain.RollupAddress(), hash)
expectAssertionConfirmed(t, ctx, setup.Backend, aliceChain.RollupAddress())
}

func TestFastConfirmationWithSafe(t *testing.T) {
Expand Down Expand Up @@ -543,8 +542,7 @@ func TestFastConfirmationWithSafe(t *testing.T) {
// Only after both Alice and Bob confirm the assertion, it should be confirmed.
ctx, cancel := context.WithTimeout(ctx, time.Second)
defer cancel()
hash := protocol.AssertionHash{Hash: posted.Unwrap().AssertionHash}
expectAssertionConfirmed(t, ctx, setup.Backend, aliceChain.RollupAddress(), hash)
expectAssertionConfirmed(t, ctx, setup.Backend, aliceChain.RollupAddress())
}

type seqMessage struct {
Expand Down Expand Up @@ -590,7 +588,6 @@ func expectAssertionConfirmed(
ctx context.Context,
backend protocol.ChainBackend,
rollupAddr common.Address,
hash protocol.AssertionHash,
) {
rc, err := rollupgen.NewRollupCore(rollupAddr, backend)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion challenge-manager/challenge-tree/add_edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (ht *RoyalChallengeTree) checkAssertionHash(ctx context.Context, id protoco
return nil
}

func (ht *RoyalChallengeTree) claimedAssertionHash(ctx context.Context, eg protocol.SpecEdge) (protocol.AssertionHash, error) {
func (ht *RoyalChallengeTree) claimedAssertionHash(_ context.Context, eg protocol.SpecEdge) (protocol.AssertionHash, error) {
challengeLevel := eg.GetChallengeLevel()
// If this is a root challege level zero edge.
if challengeLevel == protocol.NewBlockChallengeLevel() && !eg.ClaimId().IsNone() {
Expand Down
4 changes: 2 additions & 2 deletions testing/endtoend/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func runEndToEndTest(t *testing.T, cfg *e2eConfig) {
challengemanager.WithName(name),
)
honestManager := setupChallengeManager(
t, ctx, bk.Client(), rollupAddr.Rollup, honestStateManager, txOpts, name, honestOpts...,
t, ctx, bk.Client(), rollupAddr.Rollup, honestStateManager, txOpts, honestOpts...,
)
if !api.IsNil(honestManager.Database()) {
honestStateManager.UpdateAPIDatabase(honestManager.Database())
Expand Down Expand Up @@ -318,7 +318,7 @@ func runEndToEndTest(t *testing.T, cfg *e2eConfig) {
challengemanager.WithName(name),
)
evilManager := setupChallengeManager(
t, ctx, bk.Client(), rollupAddr.Rollup, evilStateManager, txOpts, name, evilOpts...,
t, ctx, bk.Client(), rollupAddr.Rollup, evilStateManager, txOpts, evilOpts...,
)
evilChallengeManagers[i] = evilManager
}
Expand Down
1 change: 0 additions & 1 deletion testing/endtoend/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func setupChallengeManager(
rollup common.Address,
sm l2stateprovider.Provider,
txOpts *bind.TransactOpts,
name string,
opts ...challengemanager.Opt,
) *challengemanager.Manager {
assertionChainBinding, err := rollupgen.NewRollupUserLogic(
Expand Down

0 comments on commit a12424d

Please sign in to comment.