Closed dooglus closed 9 years ago
How about creditstaketoaccounts[=0]
, or usedefaultstakeaccount[=1]
?
Or for a negative one, nodefaultstakeaccount[=0]
?
creditstaketoaccounts
isn't bad.
I tested committed a change that implements the flag. It seems to work well.
$ clamd listaccounts | grep -v " 0[.]00000000" # with creditstakeaddressaccounts=1
{
"" : -2783.31329042,
"1" : 292.14338700,
"1004771" : 7.04160000,
...
} # (a bunch of numbers which sum to the wallet's balance of 0.00139687)
$ clamd listaccounts | grep -v " 0[.]00000000" # with creditstakeaddressaccounts=0
{
"704586" : 0.00139687,
}
$ clamd listaccounts | grep -v " 0[.]00000000" # with nothing
{
"704586" : 0.00139687,
}
I went with creditstakestoaccounts
(added an 's' to 'stake') and merged to master branch.
The
listaccounts
balances (visible when usingenableaccounts=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.To fix this, we need to credit staking rewards to an account.
I 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.I propose a new flag:
which causes rewards to go to the accounts which own the address that staked, with the default being for the
""
account to get all rewards.The flag name is ugly. Any better suggestions?