github.com/MetalBlockchain/metalgo@v1.11.9/vms/platformvm/warp/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 warp 5 6 import ( 7 "errors" 8 "math" 9 10 "github.com/MetalBlockchain/metalgo/codec" 11 "github.com/MetalBlockchain/metalgo/codec/linearcodec" 12 ) 13 14 const CodecVersion = 0 15 16 var Codec codec.Manager 17 18 func init() { 19 Codec = codec.NewManager(math.MaxInt) 20 lc := linearcodec.NewDefault() 21 22 err := errors.Join( 23 lc.RegisterType(&BitSetSignature{}), 24 Codec.RegisterCodec(CodecVersion, lc), 25 ) 26 if err != nil { 27 panic(err) 28 } 29 }