Browse Source

Make concrete registered name be tendermint/*

pull/1782/head
Jae Kwon 7 years ago
parent
commit
f010462639
2 changed files with 8 additions and 8 deletions
  1. +6
    -6
      amino.go
  2. +2
    -2
      signature_test.go

+ 6
- 6
amino.go View File

@ -18,19 +18,19 @@ func init() {
func RegisterAmino(cdc *amino.Codec) { func RegisterAmino(cdc *amino.Codec) {
cdc.RegisterInterface((*PubKey)(nil), nil) cdc.RegisterInterface((*PubKey)(nil), nil)
cdc.RegisterConcrete(PubKeyEd25519{}, cdc.RegisterConcrete(PubKeyEd25519{},
"com.tendermint.amino.PubKeyEd25519", nil)
"tendermint/PubKeyEd25519", nil)
cdc.RegisterConcrete(PubKeySecp256k1{}, cdc.RegisterConcrete(PubKeySecp256k1{},
"com.tendermint.amino.PubKeySecp256k1", nil)
"tendermint/PubKeySecp256k1", nil)
cdc.RegisterInterface((*PrivKey)(nil), nil) cdc.RegisterInterface((*PrivKey)(nil), nil)
cdc.RegisterConcrete(PrivKeyEd25519{}, cdc.RegisterConcrete(PrivKeyEd25519{},
"com.tendermint.amino.PrivKeyEd25519", nil)
"tendermint/PrivKeyEd25519", nil)
cdc.RegisterConcrete(PrivKeySecp256k1{}, cdc.RegisterConcrete(PrivKeySecp256k1{},
"com.tendermint.amino.PrivKeySecp256k1", nil)
"tendermint/PrivKeySecp256k1", nil)
cdc.RegisterInterface((*Signature)(nil), nil) cdc.RegisterInterface((*Signature)(nil), nil)
cdc.RegisterConcrete(SignatureEd25519{}, cdc.RegisterConcrete(SignatureEd25519{},
"com.tendermint.amino.SignatureKeyEd25519", nil)
"tendermint/SignatureKeyEd25519", nil)
cdc.RegisterConcrete(SignatureSecp256k1{}, cdc.RegisterConcrete(SignatureSecp256k1{},
"com.tendermint.amino.SignatureKeySecp256k1", nil)
"tendermint/SignatureKeySecp256k1", nil)
} }

+ 2
- 2
signature_test.go View File

@ -54,12 +54,12 @@ func TestSignatureEncodings(t *testing.T) {
{ {
privKey: GenPrivKeyEd25519(), privKey: GenPrivKeyEd25519(),
sigSize: ed25519.SignatureSize, sigSize: ed25519.SignatureSize,
sigPrefix: [4]byte{0xc8, 0x5d, 0xf4, 0xba},
sigPrefix: [4]byte{0x3d, 0xa1, 0xdb, 0x2a},
}, },
{ {
privKey: GenPrivKeySecp256k1(), privKey: GenPrivKeySecp256k1(),
sigSize: 0, // unknown sigSize: 0, // unknown
sigPrefix: [4]byte{0xc6, 0xa0, 0xa, 0x42},
sigPrefix: [4]byte{0x16, 0xe1, 0xfe, 0xea},
}, },
} }


Loading…
Cancel
Save