mirror of https://github.com/poanetwork/gecko.git
Removed unused code
This commit is contained in:
parent
5363014e0b
commit
ff03ea957c
|
@ -55,9 +55,3 @@ func ToIPDesc(str string) (IPDesc, error) {
|
||||||
Port: uint16(port),
|
Port: uint16(port),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MyIP ...
|
|
||||||
func MyIP() net.IP {
|
|
||||||
// TODO: Change this to consult a json-returning external service
|
|
||||||
return net.ParseIP("127.0.0.1")
|
|
||||||
}
|
|
||||||
|
|
|
@ -12,18 +12,6 @@ import (
|
||||||
"github.com/ava-labs/gecko/utils/wrappers"
|
"github.com/ava-labs/gecko/utils/wrappers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Type is an identifier for a codec
|
|
||||||
type Type uint32
|
|
||||||
|
|
||||||
// Codec types
|
|
||||||
const (
|
|
||||||
NoType Type = iota
|
|
||||||
GenericType
|
|
||||||
CustomType
|
|
||||||
// TODO: Utilize a standard serialization library. Must have a canonical
|
|
||||||
// serialization format.
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultMaxSize = 1 << 18 // default max size, in bytes, of something being marshalled by Marshal()
|
defaultMaxSize = 1 << 18 // default max size, in bytes, of something being marshalled by Marshal()
|
||||||
defaultMaxSliceLength = 1 << 18 // default max length of a slice being marshalled by Marshal()
|
defaultMaxSliceLength = 1 << 18 // default max length of a slice being marshalled by Marshal()
|
||||||
|
@ -45,30 +33,6 @@ var (
|
||||||
errSliceTooLarge = errors.New("slice too large")
|
errSliceTooLarge = errors.New("slice too large")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Verify that the codec is a known codec value. Returns nil if the codec is
|
|
||||||
// valid.
|
|
||||||
func (c Type) Verify() error {
|
|
||||||
switch c {
|
|
||||||
case NoType, GenericType, CustomType:
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
return errBadCodec
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c Type) String() string {
|
|
||||||
switch c {
|
|
||||||
case NoType:
|
|
||||||
return "No Codec"
|
|
||||||
case GenericType:
|
|
||||||
return "Generic Codec"
|
|
||||||
case CustomType:
|
|
||||||
return "Custom Codec"
|
|
||||||
default:
|
|
||||||
return "Unknown Codec"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Codec handles marshaling and unmarshaling of structs
|
// Codec handles marshaling and unmarshaling of structs
|
||||||
type codec struct {
|
type codec struct {
|
||||||
maxSize int
|
maxSize int
|
||||||
|
|
Loading…
Reference in New Issue