Skip to content

Commit

Permalink
changes as per steb's review
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Jan 18, 2024
1 parent 7e0abca commit c90fafe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions actors/market/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub mod policy;
pub mod testing;

mod deal;
pub mod emit;
mod emit;
mod state;
mod types;

Expand Down Expand Up @@ -470,13 +470,13 @@ impl Actor {
// notify clients, any failures cause the entire publish_storage_deals method to fail
// it's unsafe to ignore errors here, since that could be used to attack storage contract clients
// that might be unaware they're making storage deals
for (i, valid_deal) in valid_deals.iter().enumerate() {
for (valid_deal, &deal_id) in valid_deals.iter().zip(&new_deal_ids) {
_ = extract_send_result(rt.send_simple(
&valid_deal.proposal.client,
MARKET_NOTIFY_DEAL_METHOD,
IpldBlock::serialize_cbor(&MarketNotifyDealParams {
proposal: valid_deal.serialized_proposal.to_vec(),
deal_id: new_deal_ids[i],
deal_id,
})?,
TokenAmount::zero(),
))
Expand All @@ -488,7 +488,7 @@ impl Actor {
rt,
valid_deal.proposal.client.id().unwrap(),
valid_deal.proposal.provider.id().unwrap(),
new_deal_ids[i],
deal_id,
)?;
}

Expand Down
5 changes: 3 additions & 2 deletions actors/miner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub mod testing;
mod types;
mod vesting_state;

pub mod emit;
mod emit;

/// Storage Miner actor methods available
#[derive(FromPrimitive)]
Expand Down Expand Up @@ -1026,7 +1026,8 @@ impl Actor {
.context_code(ExitCode::USR_ILLEGAL_STATE, "failed to load sectors array")?;
let mut sector_infos = Vec::with_capacity(params.sector_updates.len());
let mut updates = Vec::with_capacity(params.sector_updates.len());
let mut sector_commds: HashMap<SectorNumber, CompactCommD> = HashMap::new();
let mut sector_commds: HashMap<SectorNumber, CompactCommD> =
HashMap::with_capacity(params.sector_updates.len());
for (i, update) in params.sector_updates.iter().enumerate() {
sector_infos.push(sectors.must_get(update.sector)?);
let sector_type = sector_infos.last().unwrap().seal_proof;
Expand Down
3 changes: 2 additions & 1 deletion actors/verifreg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ pub use self::types::*;
#[cfg(feature = "fil-actor")]
fil_actors_runtime::wasm_trampoline!(Actor);

pub mod emit;
mod emit;

pub mod expiration;
pub mod ext;
pub mod state;
Expand Down
7 changes: 1 addition & 6 deletions integration_tests/src/tests/terminate_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,7 @@ pub fn terminate_sectors_test(v: &dyn VM) {
Expect::power_current_total(miner_id),
Expect::burn(miner_id, None),
Expect::power_update_pledge(miner_id, None),
Expect::market_sectors_terminate(
miner_id,
epoch,
[sector_number].to_vec(),
deal_clients,
),
Expect::market_sectors_terminate(miner_id, epoch, vec![sector_number], deal_clients),
Expect::power_update_claim(miner_id, sector_power.neg()),
]),
events: vec![expect_event],
Expand Down

0 comments on commit c90fafe

Please sign in to comment.