Skip to content
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

fix: patch funty for now #1097

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ overflow-checks = true
lto = true
opt-level = "z"
#strip = true

[patch.crates-io]
# temporary solution to funty@1.2.0 being yanked, we should propose bitvec upgrade to upstream filecoin crates
# tracking issue: https://github.com/bitvecto-rs/funty/issues/7
funty = { git = "https://github.com/bitvecto-rs/funty/", rev = "7ef0d890fbcd8b3def1635ac1a877fc298488446" }
7 changes: 2 additions & 5 deletions fvm/src/blockstore/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ where
{
/// Flushes the buffered cache based on the root node.
/// This will recursively traverse the cache and write all data connected by links to this
/// root Cid.
/// root Cid. Calling flush will not reset the write buffer.
fn flush(&self, root: &Cid) -> Result<()> {
let mut buffer = Vec::new();
let mut s = self.write.borrow_mut();
let s = self.write.borrow();
copy_rec(&s, *root, &mut buffer)?;

self.base.put_many_keyed(buffer)?;
*s = Default::default();

Ok(())
}
Expand Down Expand Up @@ -290,7 +289,6 @@ mod tests {
buf_store.flush(&cid).unwrap();
assert_eq!(buf_store.get_cbor::<u8>(&cid).unwrap(), Some(8));
assert_eq!(mem.get_cbor::<u8>(&cid).unwrap(), Some(8));
assert!(buf_store.write.borrow().get(&cid).is_none());
}

#[test]
Expand Down Expand Up @@ -361,6 +359,5 @@ mod tests {
assert_eq!(buf_store.get(&unsealed_comm_cid).unwrap(), None);
assert_eq!(buf_store.get(&sealed_comm_cid).unwrap(), None);
assert_eq!(mem.get_cbor::<u8>(&unconnected).unwrap(), None);
assert_eq!(buf_store.get_cbor::<u8>(&unconnected).unwrap(), None);
}
}