Refactored CALLDATALOAD to use big int
* Added BigMin
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user