mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* Bump avalanchego to v1.9.9-rc.4 * Fix imports * Bump compatibility.json for latest avalanchego release
35 lines
883 B
Go
35 lines
883 B
Go
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/ava-labs/avalanchego/utils/logging"
|
|
"github.com/ava-labs/avalanchego/utils/ulimit"
|
|
"github.com/ava-labs/avalanchego/version"
|
|
"github.com/ava-labs/avalanchego/vms/rpcchainvm"
|
|
|
|
"github.com/ava-labs/subnet-evm/plugin/evm"
|
|
)
|
|
|
|
func main() {
|
|
printVersion, err := PrintVersion()
|
|
if err != nil {
|
|
fmt.Printf("couldn't get config: %s", err)
|
|
os.Exit(1)
|
|
}
|
|
if printVersion {
|
|
fmt.Printf("Subnet-EVM/%s [AvalancheGo=%s, rpcchainvm=%d]\n", evm.Version, version.Current, version.RPCChainVMProtocol)
|
|
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{})
|
|
}
|