diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-10-06 18:35:05 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-10-06 18:42:34 +0800 |
commit | e1616f77c7fb348f6b171b608d036f2bd4e34cc3 (patch) | |
tree | 580e923bedf622c5b872ef2d23cb62fcd98a22b8 /core/execution.go | |
parent | 44fd3951410fb5923d7e578ac97942a7ea791e96 (diff) | |
download | go-tangerine-e1616f77c7fb348f6b171b608d036f2bd4e34cc3.tar.gz go-tangerine-e1616f77c7fb348f6b171b608d036f2bd4e34cc3.tar.zst go-tangerine-e1616f77c7fb348f6b171b608d036f2bd4e34cc3.zip |
core, core/vm, cmd/evm: remove redundant balance check
Diffstat (limited to 'core/execution.go')
-rw-r--r-- | core/execution.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/core/execution.go b/core/execution.go index e3c00a2ea..fd8464f6e 100644 --- a/core/execution.go +++ b/core/execution.go @@ -17,7 +17,6 @@ package core import ( - "errors" "math/big" "github.com/ethereum/go-ethereum/common" @@ -108,13 +107,7 @@ func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.A } // generic transfer method -func Transfer(from, to vm.Account, amount *big.Int) error { - if from.Balance().Cmp(amount) < 0 { - return errors.New("Insufficient balance in account") - } - +func Transfer(from, to vm.Account, amount *big.Int) { from.SubBalance(amount) to.AddBalance(amount) - - return nil } |