-
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
Implemented verified registry token receiver hook #601
Conversation
505bd59
to
619312c
Compare
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.
Looking at tests now
actors/verifreg/src/lib.rs
Outdated
) -> Result<AllocationRequests, ActorError> { | ||
let reqs: AllocationRequests = deserialize(serialized, "allocation requests")?; | ||
|
||
let mut allocation_total = StoragePower::zero(); |
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.
Why not DataCap? I think I'm missing something fundamental about how you use these types. If you use storage power here we should use it in claim_allocations too
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.
Ok changed, but I think we should delete the type now.
actors/verifreg/src/lib.rs
Outdated
.id() | ||
.unwrap(); | ||
let code_cid = | ||
rt.get_actor_code_cid(addr).with_context_code(ExitCode::USR_ILLEGAL_ARGUMENT, || { |
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.
If this was just a bad address wouldn't we already fail on resolve_address? If so this should be ILLEGAL_STATE.
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.
I see what you mean, but it's not this actor's state that is busted. Basically the runtime is returning nonsensical results. I'll leave it because I don't think ILLEGAL_STATE is better, though I agree this isn't perfect.
619312c
to
e02a793
Compare
e02a793
to
fc62f60
Compare
Implements the token receiver hook, which will replace UseBytes (when market updated in #527).
I deleted the UseBytes tests, replacing them with tests for the receiver hook.
Closes #525