github.com/ava-labs/avalanchego@v1.11.11/vms/proposervm/state/codec.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package state 5 6 import ( 7 "math" 8 9 "github.com/ava-labs/avalanchego/codec" 10 "github.com/ava-labs/avalanchego/codec/linearcodec" 11 ) 12 13 const CodecVersion = 0 14 15 var Codec codec.Manager 16 17 func init() { 18 lc := linearcodec.NewDefault() 19 Codec = codec.NewManager(math.MaxInt32) 20 21 err := Codec.RegisterCodec(CodecVersion, lc) 22 if err != nil { 23 panic(err) 24 } 25 }