From d2e20548bcd82a9c77b6d9d5b3f65dd95404f8c4 Mon Sep 17 00:00:00 2001 From: amsanghi <102982411+amsanghi@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:50:03 +0530 Subject: [PATCH] remove unused code, fix lint (#612) --- .../assertion_chain_test.go | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/chain-abstraction/sol-implementation/assertion_chain_test.go b/chain-abstraction/sol-implementation/assertion_chain_test.go index 8afed6669..c2b4486f8 100644 --- a/chain-abstraction/sol-implementation/assertion_chain_test.go +++ b/chain-abstraction/sol-implementation/assertion_chain_test.go @@ -18,7 +18,6 @@ import ( "github.com/OffchainLabs/bold/solgen/go/rollupgen" challenge_testing "github.com/OffchainLabs/bold/testing" "github.com/OffchainLabs/bold/testing/setup" - "github.com/OffchainLabs/bold/util" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -702,50 +701,3 @@ func TestLatestCreatedAssertionHashes(t *testing.T) { require.Equal(t, uint64(i), id.Big().Uint64()) } } - -type Commiter interface { - Commit() common.Hash -} - -func submitBatch( - t *testing.T, - ctx context.Context, - txOpts *bind.TransactOpts, - bridgeStubAddr common.Address, - backend bind.ContractBackend, - batchDataHash common.Hash, - totalNewMessages uint64, -) { - bridgeStub, err := mocksgen.NewBridgeStub(bridgeStubAddr, backend) - require.NoError(t, err) - - delayedCount, err := bridgeStub.DelayedMessageCount(util.GetSafeCallOpts(&bind.CallOpts{})) - require.NoError(t, err) - - seqMessageCount, err := bridgeStub.SequencerMessageCount(util.GetSafeCallOpts(&bind.CallOpts{})) - require.NoError(t, err) - - totalNew := new(big.Int).SetUint64(totalNewMessages) - newMessageCount := new(big.Int).Add(seqMessageCount, totalNew) - - _, err = bridgeStub.EnqueueSequencerMessage( - txOpts, - batchDataHash, - delayedCount, - seqMessageCount, - newMessageCount, - ) - require.NoError(t, err) - commiter, ok := backend.(Commiter) - require.Equal(t, true, ok) - commiter.Commit() - - gotMessageCount, err := bridgeStub.SequencerMessageCount(util.GetSafeCallOpts(&bind.CallOpts{})) - require.NoError(t, err) - require.Equal( - t, - newMessageCount.Uint64(), - gotMessageCount.Uint64(), - "message count after posting to bridge stub did not increase", - ) -}