tendermint/types/codec.go
Marko 362729c2bb
Renamed wire.go to codec.go (#3827)
* Renamed wire.go to codec.go

- Wire was the previous name of amino
- Codec describes the file better than `wire` & `amino`

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* ide error

* rename amino.go to codec.go
2019-07-23 15:35:36 +02:00

28 lines
528 B
Go

package types
import (
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
)
var cdc = amino.NewCodec()
func init() {
RegisterBlockAmino(cdc)
}
func RegisterBlockAmino(cdc *amino.Codec) {
cryptoAmino.RegisterAmino(cdc)
RegisterEvidences(cdc)
}
// GetCodec returns a codec used by the package. For testing purposes only.
func GetCodec() *amino.Codec {
return cdc
}
// For testing purposes only
func RegisterMockEvidencesGlobal() {
RegisterMockEvidences(cdc)
}