-
Notifications
You must be signed in to change notification settings - Fork 83
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
Use is_controlling_address in actors #948
Conversation
I look forward to this, but please target |
@anorth I think the right target branch is |
Sorry, yes @arajasek is correct |
8eb879a
to
57eec94
Compare
@anorth some test cases are failing with |
6001a12
to
07b4f5d
Compare
b8c70be
to
b6876d2
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.
This looks like the right direction now. Please re-request review when the tests are passing.
@@ -26,13 +26,27 @@ pub mod miner { | |||
use super::*; | |||
|
|||
pub const CONTROL_ADDRESSES_METHOD: u64 = 2; |
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 hope you can remove this constant and the associated params object now it's unused.
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.
yes i will
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.
@anorth didn't remove this because it's also used in escrow_address
builtin-actors/actors/market/src/lib.rs
Line 1354 in 3d501f9
let (owner_addr, worker_addr, _) = request_miner_control_addrs(rt, nominal)?; |
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.
we can rename this to request_miner_addrs
if that is more suitable
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.
We've now merged integration/builtin-api into master, so this can be rebased on master. |
508b521
to
609845b
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #948 +/- ##
==========================================
- Coverage 89.36% 87.22% -2.14%
==========================================
Files 93 93
Lines 19590 19834 +244
==========================================
- Hits 17507 17301 -206
- Misses 2083 2533 +450
|
609845b
to
8794be0
Compare
8794be0
to
3d501f9
Compare
@anorth this PR is ready for review |
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.
Thanks. Are there any other actors that use this (for a follow-up PR?)
actors/market/src/lib.rs
Outdated
IpldBlock::serialize_cbor(&ext::miner::IsControllingAddressParam { address: caller })?, | ||
TokenAmount::zero(), | ||
)?)?; | ||
let caller_ok = res.is_controlling; |
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.
Nit: inline the caller_ok
variable.
actors/market/tests/harness.rs
Outdated
@@ -166,6 +166,34 @@ pub fn expect_provider_control_address( | |||
expect_get_control_addresses(rt, provider, owner, worker, vec![]) | |||
} | |||
|
|||
pub fn expect_get_is_control_addresses( |
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.
This method has the wrong name. I think you should inline it into expect_provider_is_control_address
, which is otherwise doing nothign.
No i didn't find any other actor that uses this |
Replace existing control address accessor with new
is_controlling_address
Closes #816