Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
d0fd8d6f
Commit
d0fd8d6f
authored
Jun 14, 2018
by
kiel barry
Committed by
Péter Szilágyi
Jun 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: all golint warnings removed (#16852)
* common: all golint warnings removed * common: fixups
parent
cfde0b5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
+14
-8
hexutil.go
common/hexutil/hexutil.go
+1
-0
big.go
common/math/big.go
+2
-1
integer.go
common/math/integer.go
+1
-1
mclock.go
common/mclock/mclock.go
+4
-2
int.go
common/number/int.go
+5
-4
types.go
common/types.go
+1
-0
No files found.
common/hexutil/hexutil.go
View file @
d0fd8d6f
...
...
@@ -39,6 +39,7 @@ import (
const
uintBits
=
32
<<
(
uint64
(
^
uint
(
0
))
>>
63
)
// Errors
var
(
ErrEmptyString
=
&
decError
{
"empty hex string"
}
ErrSyntax
=
&
decError
{
"invalid hex string"
}
...
...
common/math/big.go
View file @
d0fd8d6f
...
...
@@ -22,12 +22,13 @@ import (
"math/big"
)
// Various big integer limit values.
var
(
tt255
=
BigPow
(
2
,
255
)
tt256
=
BigPow
(
2
,
256
)
tt256m1
=
new
(
big
.
Int
)
.
Sub
(
tt256
,
big
.
NewInt
(
1
))
MaxBig256
=
new
(
big
.
Int
)
.
Set
(
tt256m1
)
tt63
=
BigPow
(
2
,
63
)
MaxBig256
=
new
(
big
.
Int
)
.
Set
(
tt256m1
)
MaxBig63
=
new
(
big
.
Int
)
.
Sub
(
tt63
,
big
.
NewInt
(
1
))
)
...
...
common/math/integer.go
View file @
d0fd8d6f
...
...
@@ -21,8 +21,8 @@ import (
"strconv"
)
// Integer limit values.
const
(
// Integer limit values.
MaxInt8
=
1
<<
7
-
1
MinInt8
=
-
1
<<
7
MaxInt16
=
1
<<
15
-
1
...
...
common/mclock/mclock.go
View file @
d0fd8d6f
...
...
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
//
p
ackage mclock is a wrapper for a monotonic clock source
//
P
ackage mclock is a wrapper for a monotonic clock source
package
mclock
import
(
...
...
@@ -23,8 +23,10 @@ import (
"github.com/aristanetworks/goarista/monotime"
)
type
AbsTime
time
.
Duration
// absolute monotonic time
// AbsTime represents absolute monotonic time.
type
AbsTime
time
.
Duration
// Now returns the current absolute monotonic time.
func
Now
()
AbsTime
{
return
AbsTime
(
monotime
.
Now
())
}
common/number/int.go
View file @
d0fd8d6f
...
...
@@ -22,9 +22,11 @@ import (
"github.com/ethereum/go-ethereum/common"
)
var
tt256
=
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
256
)
var
tt256m1
=
new
(
big
.
Int
)
.
Sub
(
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
256
),
big
.
NewInt
(
1
))
var
tt255
=
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
255
)
var
(
tt256
=
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
256
)
tt256m1
=
new
(
big
.
Int
)
.
Sub
(
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
256
),
big
.
NewInt
(
1
))
tt255
=
new
(
big
.
Int
)
.
Lsh
(
big
.
NewInt
(
1
),
255
)
)
func
limitUnsigned256
(
x
*
Number
)
*
Number
{
x
.
num
.
And
(
x
.
num
,
tt256m1
)
...
...
@@ -181,7 +183,6 @@ func (i *Number) FirstBitSet() int {
}
// Variables
var
(
Zero
=
Uint
(
0
)
One
=
Uint
(
1
)
...
...
common/types.go
View file @
d0fd8d6f
...
...
@@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/crypto/sha3"
)
// Lengths of hashes and addresses in bytes.
const
(
HashLength
=
32
AddressLength
=
20
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment