mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
common: remove BigTrue
This commit is contained in:
parent
a894fe621e
commit
d3114f5e3b
2 changed files with 8 additions and 9 deletions
|
|
@ -20,14 +20,13 @@ 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
|
||||
Big32 = big.NewInt(32)
|
||||
Big256 = big.NewInt(0xff)
|
||||
Big257 = big.NewInt(257)
|
||||
Big1 = big.NewInt(1)
|
||||
Big2 = big.NewInt(2)
|
||||
Big3 = big.NewInt(3)
|
||||
Big0 = big.NewInt(0)
|
||||
Big32 = big.NewInt(32)
|
||||
Big256 = big.NewInt(0xff)
|
||||
Big257 = big.NewInt(257)
|
||||
)
|
||||
|
||||
func String2Big(num string) *big.Int {
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ func opJump(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Sta
|
|||
}
|
||||
func opJumpi(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||
pos, cond := stack.pop(), stack.pop()
|
||||
if cond.Cmp(common.BigTrue) >= 0 {
|
||||
if cond.BitLen() > 0 {
|
||||
if !contract.jumpdests.has(contract.CodeHash, contract.Code, pos) {
|
||||
nop := contract.GetOp(pos.Uint64())
|
||||
return nil, fmt.Errorf("invalid jump destination (%v) %v", nop, pos)
|
||||
|
|
|
|||
Loading…
Reference in a new issue