feat: Extend json structs to support dip0026 multi payees #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was done?
Introduce the struct
PayoutShare
and replace the fieldpayout_address
ofDMNState
andDMNStateDiff
withpayout_shares
, which isVec<PayoutShare>
.Then deserialize in such a way to convert the
payout_address
returned by the core wallet rpc in the one-element vector [PayoutShare{payout_address
, 10000}].(NB: clearly once DIP0026 is released on core wallet the deserialization part has to be changed)
Why was it done?
The aim of this PR is continuing the implementation (or at least give some ideas) of DIP0026 on platform, see here why the feature is needed completed on platform before being released by core wallet.
In particular with this PR merged the only steps left should be:
payout_shares
in the function update_masternode_identities_v0And that should be enough since the platform already pays reward-shares-contract see here
How Has This Been Tested?
The unit test
deserialize_mn_listdiff
is still working as expected