diff options
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 2 | ||||
-rw-r--r-- | plugin/evm/tx.go | 2 | ||||
-rw-r--r-- | plugin/evm/vm.go | 12 |
4 files changed, 11 insertions, 7 deletions
@@ -4,7 +4,7 @@ go 1.14 require ( github.com/VictoriaMetrics/fastcache v1.5.7 - github.com/ava-labs/avalanchego v1.1.0 + github.com/ava-labs/avalanchego v1.1.1 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set v1.7.1 github.com/edsrzf/mmap-go v1.0.0 @@ -48,6 +48,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/ava-labs/avalanchego v1.1.0 h1:kJuOXGI+kt/jXi1TVJ0F4z1CP68YoDfYUHb4HHpjGHU= github.com/ava-labs/avalanchego v1.1.0/go.mod h1:Q/I7LaMv2EYL8plNVRbcpBJsDk2py2XISfov0KK1MgU= +github.com/ava-labs/avalanchego v1.1.1 h1:rsOlMOR5jKTFqvmKgIrHnYjYeCTEA6FarcP+WNOJZwY= +github.com/ava-labs/avalanchego v1.1.1/go.mod h1:Q/I7LaMv2EYL8plNVRbcpBJsDk2py2XISfov0KK1MgU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go index 1c0ce48..f325159 100644 --- a/plugin/evm/tx.go +++ b/plugin/evm/tx.go @@ -11,11 +11,11 @@ import ( "github.com/ava-labs/coreth/core/state" + "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/utils" - "github.com/ava-labs/avalanchego/utils/codec" "github.com/ava-labs/avalanchego/utils/crypto" "github.com/ava-labs/avalanchego/utils/hashing" "github.com/ava-labs/avalanchego/vms/components/verify" diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index 9335b51..50623c3 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -14,6 +14,8 @@ import ( "sync/atomic" "time" + "github.com/ava-labs/avalanchego/codec/linearcodec" + "github.com/ava-labs/coreth" "github.com/ava-labs/coreth/core" "github.com/ava-labs/coreth/core/state" @@ -34,13 +36,13 @@ import ( "github.com/ava-labs/avalanchego/api/admin" "github.com/ava-labs/avalanchego/cache" + "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/prefixdb" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/choices" "github.com/ava-labs/avalanchego/snow/consensus/snowman" - "github.com/ava-labs/avalanchego/utils/codec" "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/crypto" "github.com/ava-labs/avalanchego/utils/formatting" @@ -122,14 +124,14 @@ var Codec codec.Manager func init() { Codec = codec.NewDefaultManager() - c := codec.NewDefault() + c := linearcodec.NewDefault() errs := wrappers.Errs{} errs.Add( c.RegisterType(&UnsignedImportTx{}), c.RegisterType(&UnsignedExportTx{}), ) - c.Skip(3) + c.SkipRegistrations(3) errs.Add( c.RegisterType(&secp256k1fx.TransferInput{}), c.RegisterType(&secp256k1fx.MintOutput{}), @@ -199,7 +201,7 @@ type VM struct { genlock sync.Mutex txSubmitChan <-chan struct{} atomicTxSubmitChan chan struct{} - baseCodec codec.Codec + baseCodec codec.Registry codec codec.Manager clock timer.Clock txFee uint64 @@ -418,7 +420,7 @@ func (vm *VM) Initialize( // so [vm.baseCodec] is a dummy codec use to fulfill the secp256k1fx VM // interface. The fx will register all of its types, which can be safely // ignored by the VM's codec. - vm.baseCodec = codec.NewDefault() + vm.baseCodec = linearcodec.NewDefault() return vm.fx.Initialize(vm) } |