{"action":"created","issue":{"url":"https://api.github.com/repos/nochowderforyou/clams/issues/186","labels_url":"https://api.github.com/repos/nochowderforyou/clams/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/nochowderforyou/clams/issues/186/comments","events_url":"https://api.github.com/repos/nochowderforyou/clams/issues/186/events","html_url":"https://github.com/nochowderforyou/clams/issues/186","id":72555717,"number":186,"title":"listaccounts values don't sum to the balance","user":{"login":"dooglus","id":573356,"avatar_url":"https://avatars.githubusercontent.com/u/573356?v=3","gravatar_id":"","url":"https://api.github.com/users/dooglus","html_url":"https://github.com/dooglus","followers_url":"https://api.github.com/users/dooglus/followers","following_url":"https://api.github.com/users/dooglus/following{/other_user}","gists_url":"https://api.github.com/users/dooglus/gists{/gist_id}","starred_url":"https://api.github.com/users/dooglus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dooglus/subscriptions","organizations_url":"https://api.github.com/users/dooglus/orgs","repos_url":"https://api.github.com/users/dooglus/repos","events_url":"https://api.github.com/users/dooglus/events{/privacy}","received_events_url":"https://api.github.com/users/dooglus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-02T00:29:21Z","updated_at":"2015-05-02T02:00:38Z","closed_at":null,"body":"The ```listaccounts``` balances (visible when using ```enableaccounts=1```) generally sum to a negative number, since when the wallet stakes, the stake isn't credited to any account, but when the staked value is spent, it is debited from an account.\r\n\r\nTo fix this, we need to credit staking rewards to an account.\r\n\r\nI figure some applications may want to credit staking rewards to the account which owns the address that staked a block, whereas other would prefer the reward to be credited to the ```\"\"``` account.\r\n\r\nI propose a new flag:\r\n\r\n    creditstakeaddressaccounts=1\r\n\r\nwhich causes rewards to go to the accounts which own the address that staked, with the default being for the ```\"\"``` account to get all rewards.\r\n\r\nThe flag name is ugly. Any better suggestions?"},"comment":{"url":"https://api.github.com/repos/nochowderforyou/clams/issues/comments/98286549","html_url":"https://github.com/nochowderforyou/clams/issues/186#issuecomment-98286549","issue_url":"https://api.github.com/repos/nochowderforyou/clams/issues/186","id":98286549,"user":{"login":"dooglus","id":573356,"avatar_url":"https://avatars.githubusercontent.com/u/573356?v=3","gravatar_id":"","url":"https://api.github.com/users/dooglus","html_url":"https://github.com/dooglus","followers_url":"https://api.github.com/users/dooglus/followers","following_url":"https://api.github.com/users/dooglus/following{/other_user}","gists_url":"https://api.github.com/users/dooglus/gists{/gist_id}","starred_url":"https://api.github.com/users/dooglus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dooglus/subscriptions","organizations_url":"https://api.github.com/users/dooglus/orgs","repos_url":"https://api.github.com/users/dooglus/repos","events_url":"https://api.github.com/users/dooglus/events{/privacy}","received_events_url":"https://api.github.com/users/dooglus/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T02:00:38Z","updated_at":"2015-05-02T02:00:38Z","body":"```creditstaketoaccounts``` isn't bad."}}