2018-06-20 17:35:30 -07:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2018-10-09 16:10:05 +04:00
|
|
|
amino "github.com/tendermint/go-amino"
|
2019-01-28 14:13:17 +02:00
|
|
|
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
|
2018-06-20 17:35:30 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
var cdc = amino.NewCodec()
|
|
|
|
|
|
|
|
func init() {
|
2018-07-26 18:08:09 -07:00
|
|
|
RegisterBlockAmino(cdc)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterBlockAmino(cdc *amino.Codec) {
|
2018-07-18 08:38:44 -07:00
|
|
|
cryptoAmino.RegisterAmino(cdc)
|
2018-07-26 18:53:19 -04:00
|
|
|
RegisterEvidences(cdc)
|
2018-06-20 17:35:30 -07:00
|
|
|
}
|
2018-10-09 16:10:05 +04:00
|
|
|
|
|
|
|
// GetCodec returns a codec used by the package. For testing purposes only.
|
|
|
|
func GetCodec() *amino.Codec {
|
|
|
|
return cdc
|
|
|
|
}
|
2019-01-17 21:46:40 -05:00
|
|
|
|
|
|
|
// For testing purposes only
|
|
|
|
func RegisterMockEvidencesGlobal() {
|
|
|
|
RegisterMockEvidences(cdc)
|
|
|
|
}
|