Skip to content

Commit

Permalink
Revert "Revert "Update ActorState impl after fvm_shared update (#1162
Browse files Browse the repository at this point in the history
…)""

This reverts commit ffb7238.
  • Loading branch information
Stebalien committed Jun 28, 2023
1 parent 2127998 commit b8e22e1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ default = ["opencl"]
opencl = ["filecoin-proofs-api/opencl"]
cuda = ["filecoin-proofs-api/cuda"]
testing = []
arb = ["arbitrary", "quickcheck"]
arb = ["arbitrary", "quickcheck", "fvm_shared/arb", "cid/arb"]
m2-native = []
hyperspace = []
gas_calibration = []
12 changes: 4 additions & 8 deletions fvm/src/state_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,12 @@ impl ActorState {
#[cfg(feature = "arb")]
impl Arbitrary for ActorState {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let cid = Cid::new_v1(
u64::arbitrary(g),
cid::multihash::Multihash::wrap(u64::arbitrary(g), &[u8::arbitrary(g)]).unwrap(),
);
Self {
code: cid,
state: cid,
code: Cid::arbitrary(g),
state: Cid::arbitrary(g),
sequence: u64::arbitrary(g),
balance: TokenAmount::from_atto(u64::arbitrary(g)),
delegated_address: None,
balance: TokenAmount::arbitrary(g),
delegated_address: Option::arbitrary(g),
}
}
}
Expand Down

0 comments on commit b8e22e1

Please sign in to comment.