mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 08:51:32 +00:00
Merge remote-tracking branch 'remotes/origin/develop' into bucky/sig-name
# Conflicts: # Gopkg.lock # keys/keybase_test.go # signature_test.go
This commit is contained in:
@ -82,14 +82,16 @@ func TestKeyEncodings(t *testing.T) {
|
||||
|
||||
// Check (de/en)codings of Signatures.
|
||||
var sig1, sig2, sig3 Signature
|
||||
sig1 = tc.privKey.Sign([]byte("something"))
|
||||
sig1, err := tc.privKey.Sign([]byte("something"))
|
||||
assert.NoError(t, err)
|
||||
checkAminoBinary(t, sig1, &sig2, -1) // Siganture size changes for Secp anyways.
|
||||
assert.EqualValues(t, sig1, sig2)
|
||||
checkAminoJSON(t, sig1, &sig3, false) // TODO also check Prefix bytes.
|
||||
assert.EqualValues(t, sig1, sig3)
|
||||
|
||||
// Check (de/en)codings of PubKeys.
|
||||
pubKey := tc.privKey.PubKey()
|
||||
pubKey, err := tc.privKey.PubKey()
|
||||
assert.NoError(t, err)
|
||||
var pub2, pub3 PubKey
|
||||
checkAminoBinary(t, pubKey, &pub2, tc.pubSize)
|
||||
assert.EqualValues(t, pubKey, pub2)
|
||||
|
Reference in New Issue
Block a user