-
Notifications
You must be signed in to change notification settings - Fork 91
Accumulation of staking rewards in different address #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@aguycalled function works for me but the wallet gui shows the wrong destination address for me: Also, seems like gettransaction rpc command will show the wrong address (I think the I think |
| @@ -1,34 +1,47 @@ | |||
| // Copyright (c) 2014 The Bitcoin developers | |||
| // Copyright (c) 2014-2018 The Bitcoin Core developers | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to staking? Seems like it's been mixed in
| txNew.vout[1].nValue = blockValue; | ||
| } | ||
|
|
||
| if (GetArg("-stakingaddress", "") != "" && !txNew.vout[txNew.vout.size()-1].scriptPubKey.IsColdStaking()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we validate a block do we check anything specific about a staking output?
|
This is a great MVP but i would argue that we should add a little more functionality before releasing it into the main net. As a user I can have multiple staking addresses which i might want to send their rewards to different reward addresses. I think we should make this value more of a map rather than a single value where i could specify "staking address:reward address" pairs. Or have an "all:reward address" which handles every staking address not otherwise specified in its own pair. |
* fixes loop to only use the address from the last vout * avoid cfund vout in coinstake
* fix list transaction rpc to show correct staking address * avoid cfund vout in coinstake and fix amount in GetReceived() * add test for -stakingaddress
marcus290
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manually checked, added python test and it includes the features suggested by @craigmacgregor
|
Tested and it appears to work. I'm not sure what the syntax is for staking to multiple addresses, so I haven't tested it. This could do with some documentation. |


In response to #399 , this PR introduces support for the -stakingaddress argument which sets a navcoin address where the staking rewards are accumulated.
Not compatible with cold staking.