Commit 47ba316d authored by Adrian Sutton's avatar Adrian Sutton

op-e2e: Use sequencer to verify deposit behaviour in TestMintOnRevertedDeposit

Makes the test faster and use fewer resources.
Extend the timeout for deposit transactions to be reflected on L2 to avoid flakiness when the L2 client isn't receiving gossip from the sequencer.
parent 8809a31f
......@@ -16,13 +16,13 @@ import (
func TestMintOnRevertedDeposit(t *testing.T) {
InitParallel(t)
cfg := DefaultSystemConfig(t)
delete(cfg.Nodes, "verifier")
sys, err := cfg.Start(t)
require.Nil(t, err, "Error starting up system")
defer sys.Close()
l1Client := sys.Clients["l1"]
l2Verif := sys.Clients["verifier"]
l2Verif := sys.Clients["sequencer"]
// create signer
aliceKey := cfg.Secrets.Alice
......
......@@ -47,7 +47,9 @@ func SendDepositTx(t *testing.T, cfg SystemConfig, l1Client *ethclient.Client, l
reconstructedDep, err := derive.UnmarshalDepositLogEvent(l1Receipt.Logs[0])
require.NoError(t, err, "Could not reconstruct L2 Deposit")
tx = types.NewTx(reconstructedDep)
l2Receipt, err := geth.WaitForTransaction(tx.Hash(), l2Client, 10*time.Duration(cfg.DeployConfig.L2BlockTime)*time.Second)
// Use a long wait because the l2Client may not be configured to receive gossip from the sequencer
// so has to wait for the batcher to submit and then import those blocks from L1.
l2Receipt, err := geth.WaitForTransaction(tx.Hash(), l2Client, 60*time.Second)
require.NoError(t, err)
require.Equal(t, l2Opts.ExpectedStatus, l2Receipt.Status, "l2 transaction status")
return l2Receipt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment