-
Notifications
You must be signed in to change notification settings - Fork 80
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
Remove all expired allocations for a client when none specified #671
Conversation
I like the proposal. I've been thinking it will work generically to use the batch info as a field to index into the others alongside it and I believe this is an example of that. The only change I would make is return a batch info with success codes for every allocation successfully in the unspecified case. This way we maintain the relationship of fields of the return value across the specified and unspecified cases. |
Codecov Report
@@ Coverage Diff @@
## decouple-fil+ #671 +/- ##
================================================
Coverage ? 84.61%
================================================
Files ? 95
Lines ? 19028
Branches ? 0
================================================
Hits ? 16100
Misses ? 2928
Partials ? 0 |
I'll do this, but it can only ever be an array of (Gas will be the only limit on the amount of work this could do, with large enough state). |
bfb41af
to
2b2d013
Compare
The way batch info serializes all these ExitCode::OK's is by incrementing the value of the single integer success count field, so this should be efficient. |
This raises a bit of a question about the return value when no allocation IDs were specified. If this were a separate method, maybe we'd return the list of removed IDs. In either case maybe we'd like to return the total datacap reclaimed. I've taken the simplest possible path here of returning nothing.
We could merge these into a return value that includes all these, like:
What do you think @ZenGround0 ?
Closes #606.