mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 04:26:37 +00:00
Fix BigMax to return the biggest number, not the smallest
This commit is contained in:
parent
2995d6c281
commit
2e6cf42011
1 changed files with 2 additions and 2 deletions
|
|
@ -68,8 +68,8 @@ func BigCopy(src *big.Int) *big.Int {
|
||||||
// Returns the maximum size big integer
|
// Returns the maximum size big integer
|
||||||
func BigMax(x, y *big.Int) *big.Int {
|
func BigMax(x, y *big.Int) *big.Int {
|
||||||
if x.Cmp(y) <= 0 {
|
if x.Cmp(y) <= 0 {
|
||||||
return x
|
return y
|
||||||
}
|
}
|
||||||
|
|
||||||
return y
|
return x
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue