Skip to content
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
19 changes: 11 additions & 8 deletions src/cli/subcommands/f3_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ impl F3Commands {
async fn get_heads(
client: &rpc::Client,
) -> anyhow::Result<(Tipset, FinalityCertificate)> {
let cert_head = client.call(F3GetLatestCertificate::request(())?).await?;
let chain_head = client.call(ChainHead::request(())?).await?;
let (cert_head, chain_head) = tokio::try_join!(
client.call(F3GetLatestCertificate::request(())?),
client.call(ChainHead::request(())?),
)?;
Ok((chain_head, cert_head))
}

Expand Down Expand Up @@ -468,12 +470,13 @@ impl F3PowerTableCommands {
));
}

let previous = F3GetCertificate::call(client, (instance.saturating_sub(1),)).await?;
let lookback = F3GetCertificate::call(
client,
(instance.saturating_sub(manifest.committee_lookback),),
)
.await?;
let (previous, lookback) = tokio::try_join!(
F3GetCertificate::call(client, (instance.saturating_sub(1),)),
F3GetCertificate::call(
client,
(instance.saturating_sub(manifest.committee_lookback),)
),
)?;
let tsk = lookback.ec_chain.last().key.clone();
Ok((tsk, previous.supplemental_data.power_table))
}
Expand Down
8 changes: 4 additions & 4 deletions src/cli/subcommands/mpool_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ impl MpoolCommands {
let tipset = ChainHead::call(&client, ()).await?;
let curr_base_fee = tipset.block_headers().first().parent_base_fee.to_owned();

let atto_str = ChainGetMinBaseFee::call(&client, (basefee_lookback,)).await?;
let (atto_str, NotNullVec(messages)) = tokio::try_join!(
ChainGetMinBaseFee::call(&client, (basefee_lookback,)),
MpoolPending::call(&client, (ApiTipsetKey(None),)),
)?;
let min_base_fee = TokenAmount::from_atto(atto_str.parse::<BigInt>()?);

let NotNullVec(messages) =
MpoolPending::call(&client, (ApiTipsetKey(None),)).await?;

let local_addrs = if local {
let response = WalletList::call(&client, ()).await?;
Some(HashSet::from_iter(response))
Expand Down
6 changes: 4 additions & 2 deletions src/networks/actors_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ mod tests {
_ => return anyhow::Ok(()),
};

let car_primary = CarStream::new(Cursor::new(primary)).await?;
let car_secondary = CarStream::new(Cursor::new(alt)).await?;
let (car_primary, car_secondary) = tokio::try_join!(
CarStream::new(Cursor::new(primary)),
CarStream::new(Cursor::new(alt)),
)?;

assert_eq!(
car_primary.header_v1.roots, car_secondary.header_v1.roots,
Expand Down
11 changes: 6 additions & 5 deletions src/tool/subcommands/snapshot_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,16 @@ where
// causing out-of-bounds errors when the snapshot contains only 900 recent state roots.
let last_epoch = ts.epoch() - epochs as i64 + 1;

// Bundles are required when doing state migrations.
load_actor_bundles(&db, &network).await?;

// Set proof parameter data dir and make sure the proofs are available
// Set proof parameter data dir before downloading proofs.
crate::utils::proofs_api::maybe_set_proofs_parameter_cache_dir_env(
&Config::default().client.data_dir,
);

ensure_proof_params_downloaded().await?;
// independent downloads - fetch in parallel
tokio::try_join!(
load_actor_bundles(&db, &network),
ensure_proof_params_downloaded(),
)?;

let chain_index = Arc::new(ChainIndex::new(Arc::new(db.clone())));

Expand Down
4 changes: 2 additions & 2 deletions src/wallet/subcommands/wallet_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ impl WalletCommands {
no_round,
no_abbrev,
} => {
let key_pairs = backend.list_addrs().await?;
let default = backend.wallet_default_address().await?;
let (key_pairs, default) =
tokio::try_join!(backend.list_addrs(), backend.wallet_default_address(),)?;

let max_addr_len = key_pairs
.iter()
Expand Down
Loading