Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
badgersrus committed Feb 27, 2024
1 parent 1608e8b commit 54e0a88
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions go/enclave/rpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"math"
"math/big"
"net"

Expand Down Expand Up @@ -372,12 +371,7 @@ func (s *RPCServer) GetRollupData(_ context.Context, request *generated.GetRollu
}
var startSeq uint64
if startSeqBigInt != nil {
if startSeqBigInt.IsInt64() && startSeqBigInt.Uint64() <= math.MaxUint64 {
startSeq = startSeqBigInt.Uint64()
} else {
s.logger.Error("startSeq value is out of uint64 range")
return nil, errors.New("startSeq value is out of uint64 range")
}
startSeq = startSeqBigInt.Uint64()
}
if timestampPtr == nil {
s.logger.Error("timestamp is nil")
Expand Down

0 comments on commit 54e0a88

Please sign in to comment.