diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-22 20:46:38 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-22 20:46:38 +0800 |
commit | 360c66c65d546cfbe3d2d910b13377485ba66e1f (patch) | |
tree | 9d83070431c1311997ed9a1c7a51d1e05adb5780 | |
parent | 2477d10aa0ac80b0735f3069a214c804cd6be957 (diff) | |
download | dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar.gz dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar.bz2 dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar.lz dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar.xz dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.tar.zst dexon-360c66c65d546cfbe3d2d910b13377485ba66e1f.zip |
Move Big* vars to big.go
-rw-r--r-- | common/big.go | 13 | ||||
-rw-r--r-- | common/common.go | 14 |
2 files changed, 13 insertions, 14 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 diff --git a/common/common.go b/common/common.go index 6c5a69d18..53709bb72 100644 --- a/common/common.go +++ b/common/common.go @@ -2,23 +2,9 @@ package common import ( "fmt" - "math/big" "time" ) -// 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) -) - func Bench(pre string, cb func()) { start := time.Now() cb() |