CanTransfer checks wether there are enough funds in the address' account to make a transfer. This does not take the necessary gas in to account to make the transfer valid.
(db vm.StateDB, addr common.Address, amount *big.Int)
| 87 | // CanTransfer checks wether there are enough funds in the address' account to make a transfer. |
| 88 | // This does not take the necessary gas in to account to make the transfer valid. |
| 89 | func CanTransfer(db vm.StateDB, addr common.Address, amount *big.Int) bool { |
| 90 | return db.GetBalance(addr).Cmp(amount) >= 0 |
| 91 | } |
| 92 | |
| 93 | // Transfer subtracts amount from sender and adds amount to recipient using the given Db |
| 94 | func Transfer(db vm.StateDB, sender, recipient common.Address, amount *big.Int) { |
nothing calls this directly
no test coverage detected