aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm_env.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm_env.go')
-rw-r--r--core/vm_env.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/vm_env.go b/core/vm_env.go
index c1a86d63e..719829543 100644
--- a/core/vm_env.go
+++ b/core/vm_env.go
@@ -69,6 +69,10 @@ func (self *VMEnv) GetHash(n uint64) common.Hash {
func (self *VMEnv) AddLog(log *state.Log) {
self.state.AddLog(log)
}
+func (self *VMEnv) CanTransfer(from vm.Account, balance *big.Int) bool {
+ return from.Balance().Cmp(balance) >= 0
+}
+
func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
return vm.Transfer(from, to, amount)
}