forked from ava-labs/coreth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
34 lines (28 loc) · 770 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package main
import (
"context"
"fmt"
"os"
"github.com/VidarSolutions/avalanchego/utils/logging"
"github.com/VidarSolutions/avalanchego/utils/ulimit"
"github.com/VidarSolutions/avalanchego/vms/rpcchainvm"
"github.com/VidarSolutions/coreth/plugin/evm"
)
func main() {
version, err := PrintVersion()
if err != nil {
fmt.Printf("couldn't get config: %s", err)
os.Exit(1)
}
if version {
fmt.Println(evm.Version)
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{IsPlugin: true})
}