Commit e52030db authored by clabby's avatar clabby Committed by GitHub

chore(op-challenger): Update kona native mode flag (#13023)

parent 8f5c20ee
......@@ -10,7 +10,6 @@ import (
type KonaExecutor struct {
nativeMode bool
clientBinPath string
}
var _ OracleServerExecutor = (*KonaExecutor)(nil)
......@@ -19,8 +18,8 @@ func NewKonaExecutor() *KonaExecutor {
return &KonaExecutor{nativeMode: false}
}
func NewNativeKonaExecutor(clientBinPath string) *KonaExecutor {
return &KonaExecutor{nativeMode: true, clientBinPath: clientBinPath}
func NewNativeKonaExecutor() *KonaExecutor {
return &KonaExecutor{nativeMode: true}
}
func (s *KonaExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.LocalGameInputs) ([]string, error) {
......@@ -37,7 +36,7 @@ func (s *KonaExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.Lo
}
if s.nativeMode {
args = append(args, "--exec", s.clientBinPath)
args = append(args, "--native")
} else {
args = append(args, "--server")
args = append(args, "--data-dir", dataDir)
......
......@@ -16,15 +16,14 @@ import (
"github.com/stretchr/testify/require"
)
var konaHostPath, konaClientPath string
var konaHostPath string
func init() {
konaHostPath = os.Getenv("KONA_HOST_PATH")
konaClientPath = os.Getenv("KONA_CLIENT_PATH")
}
func IsKonaConfigured() bool {
return konaHostPath != "" && konaClientPath != ""
return konaHostPath != ""
}
func RunKonaNative(
......@@ -57,7 +56,7 @@ func RunKonaNative(
L2Claim: fixtureInputs.L2Claim,
L2BlockNumber: big.NewInt(int64(fixtureInputs.L2BlockNumber)),
}
hostCmd, err := vm.NewNativeKonaExecutor(konaClientPath).OracleCommand(vmCfg, workDir, inputs)
hostCmd, err := vm.NewNativeKonaExecutor().OracleCommand(vmCfg, workDir, inputs)
require.NoError(t, err)
cmd := exec.Command(hostCmd[0], hostCmd[1:]...)
......
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