diff --git a/lib/grandpa/errors.go b/lib/grandpa/errors.go index 505b6e8556..1c0eb36f42 100644 --- a/lib/grandpa/errors.go +++ b/lib/grandpa/errors.go @@ -101,9 +101,6 @@ var ( // ErrAuthorityNotInSet is returned when a precommit within a justification is signed by a key not in the authority set ErrAuthorityNotInSet = errors.New("authority is not in set") - // ErrZeroInterval is returned when the grandpa sub-round interval is set to 0 - ErrZeroInterval = errors.New("cannot have zero second interval") - errVoteExists = errors.New("already have vote") errVoteToSignatureMismatch = errors.New("votes and authority count mismatch") errInvalidVoteBlock = errors.New("block in vote is not descendant of previously finalised block") diff --git a/lib/grandpa/grandpa.go b/lib/grandpa/grandpa.go index cb4122e9f2..43e3d5af6e 100644 --- a/lib/grandpa/grandpa.go +++ b/lib/grandpa/grandpa.go @@ -38,6 +38,7 @@ import ( const ( finalityGrandpaRoundMetrics = "gossamer/finality/grandpa/round" + defaultGrandpaInterval = time.Second ) var ( @@ -147,7 +148,7 @@ func NewService(cfg *Config) (*Service, error) { } if cfg.Interval == 0 { - return nil, ErrZeroInterval + cfg.Interval = defaultGrandpaInterval } ctx, cancel := context.WithCancel(context.Background())