fix comment and use errors.New instead of fmt.Errorf

This commit is contained in:
Anton Kaliaev
2019-07-09 19:38:14 +04:00
parent f95b11e07a
commit 88b7c53dcf
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ func (cp *ConcurrentProvider) joinConcurrency(chainID string, height int64) (pr
// UpdateToHeight implements UpdatingProvider.
func (cp *ConcurrentProvider) UpdateToHeight(chainID string, height int64) error {
// Performs synchronization for multi-threads verification at the same height.
// Performs synchronization for multi-threads verifications at the same height.
pr, isFirstCall, callback := cp.joinConcurrency(chainID, height)
if isFirstCall {
+2 -1
View File
@@ -5,6 +5,7 @@ package verifying
import (
"bytes"
"errors"
"fmt"
"sync"
"time"
@@ -189,7 +190,7 @@ func getTrustedCommit(logger log.Logger, client lclient.SignStatusClient, option
if latestCommit.Time.Sub(trustCommit.Time) > options.TrustPeriod {
return types.SignedHeader{},
fmt.Errorf("your trusted block height is older than the trust period from latest block")
errors.New("your trusted block height is older than the trust period from latest block")
}
signedHeader := trustCommit.SignedHeader