From 7591e93e08182bb24f5314d28973341a311f8ffd Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 23 Jun 2020 17:36:20 -0400 Subject: [PATCH] remove go-plugin logging; use coreth 0.2.5 --- go.mod | 2 +- go.sum | 2 ++ scripts/build.sh | 2 +- vms/rpcchainvm/factory.go | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index a8a8f39..c8d28c2 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/AppsFlyer/go-sundheit v0.2.0 github.com/allegro/bigcache v1.2.1 // indirect github.com/aristanetworks/goarista v0.0.0-20200520141224-0f14e646773f // indirect - github.com/ava-labs/coreth v0.2.4 // Added manually; don't delete + github.com/ava-labs/coreth v0.2.5 // Added manually; don't delete github.com/ava-labs/go-ethereum v1.9.3 // indirect github.com/deckarep/golang-set v1.7.1 // indirect github.com/decred/dcrd/dcrec/secp256k1 v1.0.3 diff --git a/go.sum b/go.sum index 3f809ed..fb197cd 100644 --- a/go.sum +++ b/go.sum @@ -22,6 +22,8 @@ github.com/aristanetworks/goarista v0.0.0-20200520141224-0f14e646773f/go.mod h1: github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= github.com/ava-labs/coreth v0.2.4 h1:MhnbuRyMcij7WU4+frayp40quc44AMPc4IrxXhmucWw= github.com/ava-labs/coreth v0.2.4/go.mod h1:pGolKipwq5vGIY2IBBcBkMYrqniXMsS5SBn+BBi4+Js= +github.com/ava-labs/coreth v0.2.5 h1:2Al753rpPHvvZfcz7w96YbKhGFvrcZzsIZ/sIp0A0Ao= +github.com/ava-labs/coreth v0.2.5/go.mod h1:pGolKipwq5vGIY2IBBcBkMYrqniXMsS5SBn+BBi4+Js= github.com/ava-labs/go-ethereum v1.9.3 h1:GmnMZ/dlvVAPFmWBzEpRJX49pUAymPfoASLNRJqR0AY= github.com/ava-labs/go-ethereum v1.9.3/go.mod h1:a+agc6fXfZFsPZCylA3ry4Y8CLCqLKg3Rc23NXZ9aw8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= diff --git a/scripts/build.sh b/scripts/build.sh index 9bee1cf..a0a59d6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,7 +15,7 @@ GECKO_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) # Directory BUILD_DIR=$GECKO_PATH/build # Where binaries go PLUGIN_DIR="$BUILD_DIR/plugins" # Where plugin binaries (namely coreth) go -CORETH_VER="0.2.4" # Should match coreth version in go.mod +CORETH_VER="0.2.5" # Should match coreth version in go.mod CORETH_PATH="$GOPATH/pkg/mod/github.com/ava-labs/coreth@v$CORETH_VER" # Build Gecko diff --git a/vms/rpcchainvm/factory.go b/vms/rpcchainvm/factory.go index a48bb01..9b7db9c 100644 --- a/vms/rpcchainvm/factory.go +++ b/vms/rpcchainvm/factory.go @@ -5,6 +5,8 @@ package rpcchainvm import ( "errors" + "io/ioutil" + "log" "os/exec" "github.com/hashicorp/go-plugin" @@ -31,6 +33,9 @@ func (f *Factory) New(ctx *snow.Context) (interface{}, error) { }, } if ctx != nil { + // disable go-plugin logging (since it is not controlled by Gecko's own + // logging facility) + log.SetOutput(ioutil.Discard) config.Stderr = ctx.Log config.SyncStdout = ctx.Log config.SyncStderr = ctx.Log