Skip to content

Commit

Permalink
chore: increase timeout of gw-tools waiting layer1 tx committed
Browse files Browse the repository at this point in the history
Why: CKB runs on poor CI machine may take too long to execute txs. Here
is an example: https://github.com/RetricSu/godwoken-kicker/runs/6586127378?check_suite_focus=true#step:15:50
  • Loading branch information
keroro520 committed May 25, 2022
1 parent 4bbd007 commit 82d495e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/tools/src/deploy_genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl<'a> DeployContext<'a> {
let tx_hash = H256::from_str(send_output.trim().trim_start_matches("0x"))?;
log::info!("tx_hash: {:#x}", tx_hash);
self.gw_ckb_client
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 120)
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 600)
.await?;
Ok(tx_hash)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tools/src/deploy_scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub async fn deploy_program(
log::info!("tx_hash: {:#x}", tx_hash);

gw_ckb_client
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 300)
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 600)
.await?;
let tx = gw_ckb_client
.get_transaction(tx_hash.0.into())
Expand Down
2 changes: 1 addition & 1 deletion crates/tools/src/deposit_ckb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub async fn deposit_ckb(
log::info!("tx_hash: {:#x}", tx_hash);

gw_rpc_client::ckb_client::CKBClient::with_url(ckb_rpc_url)?
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 180)
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 600)
.await?;

wait_for_balance_change(
Expand Down
2 changes: 1 addition & 1 deletion crates/tools/src/update_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub async fn update_cell<P: AsRef<Path>>(
.map_err(|err| anyhow!("{}", err))?;
println!("Send tx...");
CKBClient::with_url(ckb_rpc_url)?
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 180)
.wait_tx_committed_with_timeout_and_logging(tx_hash.0.into(), 600)
.await?;
println!("{}", update_message);
println!("Cell is updated!");
Expand Down

0 comments on commit 82d495e

Please sign in to comment.