From 6da65c2173e6da457423d67e958ce153c5598a17 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Tue, 20 Oct 2020 11:57:31 -0400 Subject: Add CLI config to coreth plugin --- plugin/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugin/main.go') diff --git a/plugin/main.go b/plugin/main.go index c79a305..b42ba14 100644 --- a/plugin/main.go +++ b/plugin/main.go @@ -1,6 +1,8 @@ package main import ( + "fmt" + "github.com/hashicorp/go-plugin" "github.com/ava-labs/avalanchego/vms/rpcchainvm" @@ -9,10 +11,13 @@ import ( ) func main() { + if errs.Errored() { + panic(fmt.Sprintf("Errored while parsing Coreth CLI Config: %w", errs.Err)) + } plugin.Serve(&plugin.ServeConfig{ HandshakeConfig: rpcchainvm.Handshake, Plugins: map[string]plugin.Plugin{ - "vm": rpcchainvm.New(&evm.VM{}), + "vm": rpcchainvm.New(&evm.VM{CLIConfig: cliConfig}), }, // A non-nil value here enables gRPC serving for this plugin... -- cgit v1.2.3-70-g09d2