-
Notifications
You must be signed in to change notification settings - Fork 159
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
Compute unsealed sector CID syscall #360
Conversation
2d93cbe
to
081285b
Compare
vm/Cargo.toml
Outdated
@@ -15,3 +15,9 @@ num-derive = "0.3.0" | |||
clock = { path = "../node/clock" } | |||
thiserror = "1.0.11" | |||
crypto = { path = "../crypto" } | |||
commcid = { path = "../utils/commcid" } | |||
|
|||
[dependencies.filecoin-proofs-api] |
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 the departure from our standard way of declaring dependencies?
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.
Also, don't understand why we need to specify a version if we already specify a rev.
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.
just for safety, and the reason I used this format is just to make updating commit easier and more visible, I'll change to other format tho
vm/runtime/Cargo.toml
Outdated
commcid = { path = "../../utils/commcid" } | ||
|
||
[dependencies.filecoin-proofs-api] |
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.
Same as the comment in vm/Cargo.toml
vm/runtime/src/lib.rs
Outdated
let mut sum = 0u64; | ||
for p in pieces { | ||
sum += p.size.0; | ||
} |
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.
let sum: u64 = pieces.iter().map(|p| p.size.0).sum();
Now sum doesn't have to be mut. Not an important change, but a fun one.
line 23 in vm/src/piece/mod.rs |
Nah it's just a u64 so better to just move in. Pretty sure clippy warns on this |
Summary of changes
Changes introduced in this pull request:
Dependent on #357 so I will remove other commits when that comes into mater and open this PR up
Reference issue to close (if applicable)
Closes
#303
Other information and links