aboutsummaryrefslogtreecommitdiffstats
path: root/common/big.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-23 04:46:46 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-23 04:46:46 +0800
commit8affdf96e23f092b7fe24d168b024b10eab35e05 (patch)
tree3d29fe62226a54a8f22d194df03224c7625e1312 /common/big.go
parent3133372a6a81c91528afbde58e22b3f9df257d03 (diff)
parentbf73f02fe040086ac7c9786a15fadc65840a8536 (diff)
downloaddexon-8affdf96e23f092b7fe24d168b024b10eab35e05.tar.gz
dexon-8affdf96e23f092b7fe24d168b024b10eab35e05.tar.zst
dexon-8affdf96e23f092b7fe24d168b024b10eab35e05.zip
Merge pull request #547 from tgerring/commoncleanup
common/common.go cleanup
Diffstat (limited to 'common/big.go')
-rw-r--r--common/big.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/big.go b/common/big.go
index 8fe9d8bef..e8057acf6 100644
--- a/common/big.go
+++ b/common/big.go
@@ -2,6 +2,19 @@ package common
import "math/big"
+// Common big integers often used
+var (
+ Big1 = big.NewInt(1)
+ Big2 = big.NewInt(2)
+ Big3 = big.NewInt(3)
+ Big0 = big.NewInt(0)
+ BigTrue = Big1
+ BigFalse = Big0
+ Big32 = big.NewInt(32)
+ Big256 = big.NewInt(0xff)
+ Big257 = big.NewInt(257)
+)
+
// Big pow
//
// Returns the power of two big integers