Fix finalizdAllocation and cancelAllocation payments #217
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.
Resolves issue #198
finalizedAllocation
andcancelAllocation
.finalizedAllocation
andcancelAllocation
.cacnel
->cancel
.Modify Payments
finalizedAllocation
andcancelAllocation
are approximate cut and paste of each other. Common code separated out into a local functionfinishAllocation
.finishAllocation
. ThefinalizedAllocation
pass rates calculated by converting open requests to failiars.Merge cut and paste functions
New functions
moveReward
for paying out service charges and delegate rewards. Replace cut and paste methodschallengePool.moveReward
andwritePool.movePartToStake
.Deactivate broken unit tests
Broken unit tests disabled and added to issue #130
Test_finalize_allocation
Fails because the challenge pool is less than the min lock demand, unrealistic.Test_flow_no_challenge_responses_finalize
Assumes blobbers don't get a reward. PR gives blobbers a service charge.