Skip to content

Commit 3e95899

Browse files
authored
fix: longer timeout better metrics (#46)
- Longer timeout will give us better vis into blocks reverting - cleanup a metric namespace for consistency
1 parent f1ea58e commit 3e95899

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/submit_transaction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async fn send_transaction(provider: Provider, recipient_address: Address) {
4848
let result = provider.send_transaction(tx).await.unwrap();
4949

5050
// wait for the transaction to mine
51-
let receipt = match timeout(Duration::from_secs(60), result.get_receipt()).await {
51+
let receipt = match timeout(Duration::from_secs(240), result.get_receipt()).await {
5252
Ok(Ok(receipt)) => receipt,
5353
Ok(Err(e)) => {
5454
tracing::error!(error = ?e, "failed to get transaction receipt");
@@ -66,7 +66,7 @@ async fn send_transaction(provider: Provider, recipient_address: Address) {
6666
// record metrics for how long it took to mine the transaction
6767
let mine_time = dispatch_start_time.elapsed().as_secs();
6868
tracing::debug!(success = receipt.status(), mine_time, hash, "transaction mined");
69-
histogram!("integration.tx_mine_time").record(mine_time as f64);
69+
histogram!("txn_submitter.tx_mine_time").record(mine_time as f64);
7070
}
7171

7272
async fn connect_from_config() -> (Provider, Address, u64) {

0 commit comments

Comments
 (0)