Merge pull request #1532 : Add Codec.Seal

fix wire
This commit is contained in:
Joon 2018-07-05 09:04:21 -07:00 committed by Rigel
parent 1d12985e56
commit 22ec6ad98d
7 changed files with 12 additions and 2 deletions

View File

@ -769,6 +769,7 @@ func MakeCodec() *wire.Codec {
crypto.RegisterAmino(cdc)
cdc.RegisterInterface((*auth.Account)(nil), nil)
cdc.RegisterConcrete(&auth.BaseAccount{}, "cosmos-sdk/BaseAccount", nil)
cdc.Seal()
return cdc
}

View File

@ -197,6 +197,7 @@ func MakeCodec() *wire.Codec {
auth.RegisterWire(cdc)
sdk.RegisterWire(cdc)
wire.RegisterCrypto(cdc)
cdc.Seal()
return cdc
}

View File

@ -103,6 +103,8 @@ func MakeCodec() *wire.Codec {
cdc.RegisterInterface((*auth.Account)(nil), nil)
cdc.RegisterConcrete(&types.AppAccount{}, "basecoin/Account", nil)
cdc.Seal()
return cdc
}

View File

@ -113,6 +113,9 @@ func MakeCodec() *wire.Codec {
// Register AppAccount
cdc.RegisterInterface((*auth.Account)(nil), nil)
cdc.RegisterConcrete(&types.AppAccount{}, "democoin/Account", nil)
cdc.Seal()
return cdc
}

View File

@ -48,6 +48,8 @@ func makeCodec() *wire.Codec {
cdc.RegisterInterface((*Payload)(nil), nil)
cdc.RegisterConcrete(seqOracle{}, "test/oracle/seqOracle", nil)
cdc.Seal()
return cdc
}

View File

@ -44,6 +44,5 @@ var Cdc *Codec
func init() {
cdc := NewCodec()
RegisterCrypto(cdc)
Cdc = cdc
//Cdc = cdc.Seal() // TODO uncomment once amino upgraded to 0.9.10
Cdc = cdc.Seal()
}

View File

@ -53,6 +53,8 @@ func makeCodec() *wire.Codec {
cdc.RegisterConcrete(&auth.BaseAccount{}, "test/ibc/Account", nil)
wire.RegisterCrypto(cdc)
cdc.Seal()
return cdc
}