Commit 7ee76c23 authored by Mark Tyneway's avatar Mark Tyneway

l2geth: remove unnecessary reflect

There was a usage of `refect` that was not required. This PR removes its
usage so that the code is simplified.
parent 1574f946
---
'@eth-optimism/l2geth': patch
---
Remove an unnecessary use of `reflect` in l2geth
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"math/big" "math/big"
"reflect"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -90,7 +89,7 @@ func getAccountNonce(evm *EVM, contract *Contract, args map[string]interface{}) ...@@ -90,7 +89,7 @@ func getAccountNonce(evm *EVM, contract *Contract, args map[string]interface{})
return nil, errors.New("Could not parse address arg in getAccountNonce") return nil, errors.New("Could not parse address arg in getAccountNonce")
} }
nonce := evm.StateDB.GetNonce(address) nonce := evm.StateDB.GetNonce(address)
return []interface{}{new(big.Int).SetUint64(reflect.ValueOf(nonce).Uint())}, nil return []interface{}{new(big.Int).SetUint64(nonce)}, nil
} }
func getAccountEthAddress(evm *EVM, contract *Contract, args map[string]interface{}) ([]interface{}, error) { func getAccountEthAddress(evm *EVM, contract *Contract, args map[string]interface{}) ([]interface{}, error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment