aboutsummaryrefslogtreecommitdiffstats
path: root/common/number/int.go
diff options
context:
space:
mode:
authorkiel barry <kiel.j.barry@gmail.com>2018-06-14 17:52:50 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-06-14 17:52:50 +0800
commitd0fd8d6fc29ec859650adf30718e2b06786e854f (patch)
tree5eafbd61e5886245ab48c1670337ca5d6be14718 /common/number/int.go
parentcfde0b5f5204647e356a229463337b104552fe2a (diff)
downloaddexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar.gz
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar.bz2
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar.lz
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar.xz
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.tar.zst
dexon-d0fd8d6fc29ec859650adf30718e2b06786e854f.zip
common: all golint warnings removed (#16852)
* common: all golint warnings removed * common: fixups
Diffstat (limited to 'common/number/int.go')
-rw-r--r--common/number/int.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/number/int.go b/common/number/int.go
index 5b5066970..0cac94254 100644
--- a/common/number/int.go
+++ b/common/number/int.go
@@ -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)