mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
crypto: API modifications (#5236)
## Description This PR aims to make the crypto.PubKey interface more intuitive. Changes: - `VerfiyBytes` -> `VerifySignature` Before `Bytes()` was amino encoded, now since it is the byte representation should we get rid of it entirely? EDIT: decided to keep `Bytes()` as it is useful if you are using the interface instead of the concrete key Closes: #XXX
This commit is contained in:
@@ -247,7 +247,7 @@ func (th *TestHarness) TestSignProposal() error {
|
||||
return err
|
||||
}
|
||||
// now validate the signature on the proposal
|
||||
if sck.VerifyBytes(propBytes, prop.Signature) {
|
||||
if sck.VerifySignature(propBytes, prop.Signature) {
|
||||
th.logger.Info("Successfully validated proposal signature")
|
||||
} else {
|
||||
th.logger.Error("FAILED: Proposal signature validation failed")
|
||||
@@ -298,7 +298,7 @@ func (th *TestHarness) TestSignVote() error {
|
||||
}
|
||||
|
||||
// now validate the signature on the proposal
|
||||
if sck.VerifyBytes(voteBytes, vote.Signature) {
|
||||
if sck.VerifySignature(voteBytes, vote.Signature) {
|
||||
th.logger.Info("Successfully validated vote signature", "type", voteType)
|
||||
} else {
|
||||
th.logger.Error("FAILED: Vote signature validation failed", "type", voteType)
|
||||
|
||||
Reference in New Issue
Block a user