Skip to content

Commit

Permalink
Merge branch 'master' into alexytsu/market-process-deal-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
anorth authored Sep 8, 2023
2 parents 34a3793 + 2b1df06 commit 55a62dd
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 244 deletions.
467 changes: 239 additions & 228 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ libipld-core = { version = "0.13.1", features = ["serde-codec"] }
integer-encoding = { version = "3.0.3", default-features = false }

# helix-onchain
fvm_actor_utils = "7.0.0"
frc42_dispatch = "3.3.0"
frc46_token = "7.0.0"
fvm_actor_utils = "8.0.0"
frc42_dispatch = "4.0.0"
frc46_token = "8.0.0"

# FVM
fvm_sdk = "~3.3.0"
fvm_shared = "~3.4.0"
fvm_shared = "~3.6.0"
fvm_ipld_encoding = "0.4.0"
fvm_ipld_blockstore = "0.2.0"
fvm_ipld_hamt = "0.7.0"
Expand Down
6 changes: 2 additions & 4 deletions actors/miner/src/expiration_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ impl<'db, BS: Blockstore> ExpirationQueue<'db, BS> {
}

/// Traverses the entire queue with a callback function that may mutate entries.
/// Iff the function returns that it changed an entry, the new entry will be re-written in the queue. Any changed
/// entries that become empty are removed after iteration completes.
/// Iff the function returns that it changed an entry, the new entry will be re-written in the
/// queue. Any changed entries that become empty are removed after iteration completes.
fn iter_while_mut(
&mut self,
mut f: impl FnMut(
Expand All @@ -715,8 +715,6 @@ impl<'db, BS: Blockstore> ExpirationQueue<'db, BS> {
let keep_going = f(e.try_into()?, expiration_set)?;

if expiration_set.is_empty() {
// Mark expiration set as unchanged, it will be removed after the iteration.
expiration_set.mark_unchanged();
epochs_emptied.push(e);
}

Expand Down
4 changes: 2 additions & 2 deletions actors/miner/tests/apply_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ fn rewards_pay_back_fee_debt() {
let (locked_reward, _) = locked_reward_from_reward(reward.clone());
let remaining_locked = locked_reward - &st.fee_debt; // note that this would be clamped at 0 if difference above is < 0
assert!(remaining_locked.is_positive());
let pledge_delta = remaining_locked.clone();
let pledge_delta = &remaining_locked;
rt.set_caller(*REWARD_ACTOR_CODE_ID, REWARD_ACTOR_ADDR);
rt.expect_validate_caller_addr(vec![REWARD_ACTOR_ADDR]);
// expect pledge update
rt.expect_send_simple(
STORAGE_POWER_ACTOR_ADDR,
PowerMethod::UpdatePledgeTotal as u64,
IpldBlock::serialize_cbor(&pledge_delta).unwrap(),
IpldBlock::serialize_cbor(pledge_delta).unwrap(),
TokenAmount::zero(),
None,
ExitCode::OK,
Expand Down
4 changes: 2 additions & 2 deletions actors/miner/tests/change_worker_address_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn setup() -> (ActorHarness, MockRuntime) {
fn successfully_change_only_the_worker_address() {
let (h, rt) = setup();

let original_control_addresses = h.control_addrs.clone();
let original_control_addresses = &h.control_addrs;
let new_worker = Address::new_id(999);

// set epoch to something close to next deadline so first cron will be before effective date
Expand Down Expand Up @@ -71,7 +71,7 @@ fn successfully_change_only_the_worker_address() {

// assert control addresses are unchanged
assert!(!info.control_addresses.is_empty());
assert_eq!(original_control_addresses, info.control_addresses);
assert_eq!(original_control_addresses, &info.control_addresses);

h.check_state(&rt);
}
Expand Down
4 changes: 2 additions & 2 deletions actors/verifreg/tests/verifreg_actor_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ mod clients {
let allowance_verifier = verifier_allowance(&rt);
h.add_verifier(&rt, &VERIFIER, &allowance_verifier).unwrap();

let allowance = rt.policy.minimum_verified_allocation_size.clone();
h.add_client(&rt, &VERIFIER, &CLIENT, &allowance).unwrap();
let allowance = &rt.policy.minimum_verified_allocation_size;
h.add_client(&rt, &VERIFIER, &CLIENT, allowance).unwrap();
h.check_state(&rt);
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ no-provider-deal-collateral = []
fake-proofs = []


test_utils = ["hex", "multihash/sha2", "libsecp256k1", "blake2b_simd", "rand", "rand/std_rng", "lazy_static", "pretty_env_logger"]
test_utils = ["hex", "multihash/sha2", "multihash/sha3", "multihash/ripemd", "libsecp256k1", "blake2b_simd", "rand", "rand/std_rng", "lazy_static", "pretty_env_logger"]
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.69.0"
channel = "1.70.0"
components = ["clippy", "llvm-tools-preview", "rustfmt"]
targets = ["wasm32-unknown-unknown"]

0 comments on commit 55a62dd

Please sign in to comment.