Skip to content

Commit

Permalink
prioritize test flag over the test's decision to record a block
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Oct 15, 2024
1 parent eb2c5be commit 2b1d7a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions system_tests/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,10 @@ var (
// This can be used as an input to the arbitrator prover to validate a block.
func recordBlock(t *testing.T, block uint64, builder *NodeBuilder) {
t.Helper()
flag.Parse()
if !*recordBlockInputsEnable {
return
}
ctx := builder.ctx
inboxPos := arbutil.MessageIndex(block)
for {
Expand Down
6 changes: 1 addition & 5 deletions system_tests/program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"bytes"
"context"
"encoding/binary"
"flag"
"fmt"
"math"
"math/big"
Expand Down Expand Up @@ -426,10 +425,7 @@ func storageTest(t *testing.T, jit bool) {

// Captures a block_inputs json file for the block that included the
// storage write transaction. Include wasm targets necessary for arbitrator prover and jit binaries
flag.Parse()
if *recordBlockInputsEnable {
recordBlock(t, receipt.BlockNumber.Uint64(), builder)
}
recordBlock(t, receipt.BlockNumber.Uint64(), builder)
}

func TestProgramTransientStorage(t *testing.T) {
Expand Down

0 comments on commit 2b1d7a2

Please sign in to comment.