/
codec.go
32 lines (29 loc) · 860 Bytes
/
codec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package types
import (
"github.com/FiboChain/fbc/libs/cosmos-sdk/codec"
codectypes "github.com/FiboChain/fbc/libs/cosmos-sdk/codec/types"
"github.com/FiboChain/fbc/libs/ibc-go/modules/core/exported"
)
// RegisterInterfaces registers the tendermint concrete client-related
// implementations and interfaces.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterImplementations(
(*exported.ClientState)(nil),
&ClientState{},
)
registry.RegisterImplementations(
(*exported.ConsensusState)(nil),
&ConsensusState{},
)
registry.RegisterImplementations(
(*exported.Header)(nil),
&Header{},
)
registry.RegisterImplementations(
(*exported.Misbehaviour)(nil),
&Misbehaviour{},
)
}
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(&ClientState{}, "ibc.lightclients.tendermint.v1.ClientState", nil)
}