File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package digest
19
19
import (
20
20
"context"
21
21
"errors"
22
+ "math"
22
23
"math/big"
23
24
24
25
"github.com/ChainSafe/gossamer/dot/types"
@@ -28,7 +29,7 @@ import (
28
29
log "github.com/ChainSafe/log15"
29
30
)
30
31
31
- var maxUint64 = uint64 (2 ^ 64 ) - 1
32
+ var maxUint64 = uint64 (math . MaxUint64 )
32
33
33
34
var (
34
35
_ services.Service = & Handler {}
Original file line number Diff line number Diff line change @@ -273,7 +273,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb
273
273
github.com/golang/mock v1.2.0 /go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A =
274
274
github.com/golang/mock v1.3.1 /go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y =
275
275
github.com/golang/mock v1.4.0 /go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw =
276
- github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc =
277
276
github.com/golang/mock v1.4.4 /go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4 =
278
277
github.com/golang/protobuf v1.2.0 /go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U =
279
278
github.com/golang/protobuf v1.3.0 /go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0 =
Original file line number Diff line number Diff line change @@ -710,11 +710,11 @@ func (s *Service) determinePreVote() (*Vote, error) {
710
710
711
711
nextChange := s .digestHandler .NextGrandpaAuthorityChange ()
712
712
if uint64 (vote .number ) > nextChange {
713
- header , err := s .blockState .GetHeaderByNumber (big .NewInt (int64 (nextChange )))
713
+ headerNum := new (big.Int ).SetUint64 (nextChange )
714
+ header , err := s .blockState .GetHeaderByNumber (headerNum )
714
715
if err != nil {
715
716
return nil , err
716
717
}
717
-
718
718
vote = NewVoteFromHeader (header )
719
719
}
720
720
You can’t perform that action at this time.
0 commit comments