types: revert to old wire. builds

This commit is contained in:
Ethan Buchman 2018-03-02 01:33:38 -05:00
parent 3395f5fb0e
commit 51628aea08
2 changed files with 13 additions and 5 deletions

View File

@ -80,13 +80,13 @@ func (evl EvidenceList) Has(evidence Evidence) bool {
//-------------------------------------------
const (
wireTypeEvidenceDuplicateVote = "com.tendermint.types.evidence.duplicate_vote"
evidenceTypeDuplicateVote = byte(0x01)
)
func init() {
wire.RegisterInterface((*Evidence)(nil), nil)
wire.RegisterConcrete(&DuplicateVoteEvidence{}, wireTypeEvidenceDuplicateVote, nil)
}
var _ = wire.RegisterInterface(
struct{ Evidence }{},
wire.ConcreteType{&DuplicateVoteEvidence{}, evidenceTypeDuplicateVote},
)
//-------------------------------------------

View File

@ -36,6 +36,14 @@ func UnmarshalJSON(jsonBz []byte, ptr interface{}) error {
return wire.UnmarshalJSON(jsonBz, ptr)
}
type ConcreteType = wire.ConcreteType
func RegisterInterface(o interface{}, ctypes ...ConcreteType) *wire.TypeInfo {
return wire.RegisterInterface(o, ctypes...)
}
const RFC3339Millis = wire.RFC3339Millis
/*
func RegisterInterface(ptr interface{}, opts *wire.InterfaceOptions) {