aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils.go')
-rw-r--r--core/utils.go23
1 files changed, 1 insertions, 22 deletions
diff --git a/core/utils.go b/core/utils.go
index 671d680..838369c 100644
--- a/core/utils.go
+++ b/core/utils.go
@@ -146,27 +146,6 @@ func HashConfigurationBlock(
)
}
-// VerifyBlock verifies the signature of types.Block.
-func VerifyBlock(b *types.Block) (err error) {
- hash, err := hashBlock(b)
- if err != nil {
- return
- }
- if hash != b.Hash {
- err = ErrIncorrectHash
- return
- }
- pubKey, err := crypto.SigToPub(b.Hash, b.Signature)
- if err != nil {
- return
- }
- if !b.ProposerID.Equal(types.NewNodeID(pubKey)) {
- err = ErrIncorrectSignature
- return
- }
- return
-}
-
// VerifyAgreementResult perform sanity check against a types.AgreementResult
// instance.
func VerifyAgreementResult(
@@ -201,7 +180,7 @@ func VerifyAgreementResult(
if _, exist := notarySet[vote.ProposerID]; !exist {
return ErrIncorrectVoteProposer
}
- ok, err := verifyVoteSignature(&vote)
+ ok, err := utils.VerifyVoteSignature(&vote)
if err != nil {
return err
}