aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/big.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-25 16:43:35 +0800
committerobscuren <geffobscura@gmail.com>2014-07-25 16:43:35 +0800
commitd761af84c83ae8d9d723e6766abb7950ff59cdf3 (patch)
tree6fe0805649ddf38b2b90e77c5fb2000a4bdab536 /ethutil/big.go
parent06ec80f39495bdd92878468cf862f52e9748f1ca (diff)
parent54f9ea14e197ad805f24592153f1b9e69f3bc5c3 (diff)
downloadgo-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar.gz
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar.bz2
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar.lz
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar.xz
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.tar.zst
go-tangerine-d761af84c83ae8d9d723e6766abb7950ff59cdf3.zip
Merge branch 'release/0.6.0'
Diffstat (limited to 'ethutil/big.go')
-rw-r--r--ethutil/big.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/ethutil/big.go b/ethutil/big.go
index 7af6f7414..ec263b818 100644
--- a/ethutil/big.go
+++ b/ethutil/big.go
@@ -4,14 +4,6 @@ import (
"math/big"
)
-var BigInt0 *big.Int = big.NewInt(0)
-
-// True
-var BigTrue *big.Int = big.NewInt(1)
-
-// False
-var BigFalse *big.Int = big.NewInt(0)
-
// Big pow
//
// Returns the power of two big integers
@@ -73,3 +65,14 @@ func BigMax(x, y *big.Int) *big.Int {
return x
}
+
+// Big min
+//
+// Returns the minimum size big integer
+func BigMin(x, y *big.Int) *big.Int {
+ if x.Cmp(y) >= 0 {
+ return y
+ }
+
+ return x
+}