Files
evm/plugin/runner/runner.go
T
b5698242c8 chore: Bump avalanchego to master (#1443)
Co-authored-by: Martin HS <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
Co-authored-by: Richard Pringle <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
2025-02-24 06:41:24 -08:00

34 lines
780 B
Go

// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package runner
import (
"context"
"fmt"
"os"
"github.com/ava-labs/avalanchego/utils/logging"
"github.com/ava-labs/avalanchego/utils/ulimit"
"github.com/ava-labs/avalanchego/vms/rpcchainvm"
"github.com/ava-labs/subnet-evm/plugin/evm"
)
func Run(versionStr string) {
printVersion, err := PrintVersion()
if err != nil {
fmt.Printf("couldn't get config: %s", err)
os.Exit(1)
}
if printVersion && versionStr != "" {
fmt.Print(versionStr)
os.Exit(0)
}
if err := ulimit.Set(ulimit.DefaultFDLimit, logging.NoLog{}); err != nil {
fmt.Printf("failed to set fd limit correctly due to: %s", err)
os.Exit(1)
}
rpcchainvm.Serve(context.Background(), &evm.VM{})
}