{"action":"closed","issue":{"url":"https://api.github.com/repos/ethereum/wiki/issues/623","repository_url":"https://api.github.com/repos/ethereum/wiki","labels_url":"https://api.github.com/repos/ethereum/wiki/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/wiki/issues/623/comments","events_url":"https://api.github.com/repos/ethereum/wiki/issues/623/events","html_url":"https://github.com/ethereum/wiki/issues/623","id":363371188,"node_id":"MDU6SXNzdWUzNjMzNzExODg=","number":623,"title":"how to compare the from's funds when send tx","user":{"login":"kazaff","id":801787,"node_id":"MDQ6VXNlcjgwMTc4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/801787?v=4","gravatar_id":"","url":"https://api.github.com/users/kazaff","html_url":"https://github.com/kazaff","followers_url":"https://api.github.com/users/kazaff/followers","following_url":"https://api.github.com/users/kazaff/following{/other_user}","gists_url":"https://api.github.com/users/kazaff/gists{/gist_id}","starred_url":"https://api.github.com/users/kazaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazaff/subscriptions","organizations_url":"https://api.github.com/users/kazaff/orgs","repos_url":"https://api.github.com/users/kazaff/repos","events_url":"https://api.github.com/users/kazaff/events{/privacy}","received_events_url":"https://api.github.com/users/kazaff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-25T00:51:37Z","updated_at":"2018-10-17T06:31:50Z","closed_at":"2018-10-17T06:31:50Z","author_association":"NONE","body":"Hi there,\r\n\r\nI wonder that when we create a transaction and send it with `eth_sendRawTransaction` RPC method, how the Geth can make sure the error(Insufficient funds for gas * price + value) was happened?\r\n\r\nI mean i know the source code in here:\r\n```golang\r\n        // Transactor should have enough funds to cover the costs\r\n\t// cost == V + GP * GL\r\n\tif b := currentState.GetBalance(from); b.Cmp(tx.Cost()) < 0 {\r\n\t\treturn core.ErrInsufficientFunds\r\n\t}\r\n```\r\nBut I would like to know the detail about `currentState.GetBalance(from)` like:\r\n\r\n**DO the from address's balance include any transaction in pending?** or just only contain completed transaction?\r\n\r\nThanks in advance!!"}}
{"actor":{"display_login":"jamesray1"}}