diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 7700ec28e4..274e368b74 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -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 { diff --git a/system_tests/program_test.go b/system_tests/program_test.go index d6324df301..9aac1eb589 100644 --- a/system_tests/program_test.go +++ b/system_tests/program_test.go @@ -7,7 +7,6 @@ import ( "bytes" "context" "encoding/binary" - "flag" "fmt" "math" "math/big" @@ -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) {