wire
This commit is contained in:
parent
1d3904dfd3
commit
5bc5135c1b
|
@ -72,7 +72,6 @@ func NewBasecoinApp(logger log.Logger, db dbm.DB) *BasecoinApp {
|
||||||
// custom tx codec
|
// custom tx codec
|
||||||
func MakeTxCodec() *wire.Codec {
|
func MakeTxCodec() *wire.Codec {
|
||||||
cdc := wire.NewCodec()
|
cdc := wire.NewCodec()
|
||||||
cdc.RegisterInterface((*sdk.Msg)(nil), nil)
|
|
||||||
bank.RegisterWire(cdc) // Register bank.[SendMsg,IssueMsg] types.
|
bank.RegisterWire(cdc) // Register bank.[SendMsg,IssueMsg] types.
|
||||||
return cdc
|
return cdc
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package bank
|
package bank
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
"github.com/tendermint/go-wire"
|
"github.com/tendermint/go-wire"
|
||||||
)
|
)
|
||||||
|
@ -9,5 +10,8 @@ func RegisterWire(cdc *wire.Codec) {
|
||||||
// TODO include option to always include prefix bytes.
|
// TODO include option to always include prefix bytes.
|
||||||
cdc.RegisterConcrete(SendMsg{}, "cosmos-sdk/SendMsg", nil)
|
cdc.RegisterConcrete(SendMsg{}, "cosmos-sdk/SendMsg", nil)
|
||||||
cdc.RegisterConcrete(IssueMsg{}, "cosmos-sdk/IssueMsg", nil)
|
cdc.RegisterConcrete(IssueMsg{}, "cosmos-sdk/IssueMsg", nil)
|
||||||
|
|
||||||
|
cdc.RegisterInterface((*sdk.Msg)(nil), nil)
|
||||||
|
|
||||||
crypto.RegisterWire(cdc) // Register crypto.[PubKey,PrivKey,Signature] types.
|
crypto.RegisterWire(cdc) // Register crypto.[PubKey,PrivKey,Signature] types.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue