Skip to content

Commit f7cf508

Browse files
authored
feat(builder): move transaction sent at time tracker to before the send call (alchemyplatform#1101)
1 parent 31fd5e2 commit f7cf508

File tree

8 files changed

+10
-17
lines changed

8 files changed

+10
-17
lines changed

.github/workflows/ci.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ jobs:
2828
cache-on-failure: true
2929
- name: Install Foundry
3030
uses: foundry-rs/foundry-toolchain@v1
31-
with:
32-
version: "v0.3.0"
3331

3432
# Build to generate the ABI bindings.
3533
- name: cargo build

.github/workflows/compliance.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jobs:
2424

2525
- name: Install Foundry
2626
uses: foundry-rs/foundry-toolchain@v1
27-
with:
28-
version: "v0.3.0"
2927

3028
- uses: KengoTODA/actions-setup-docker-compose@v1
3129
with:

.github/workflows/release.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ jobs:
6363
- name: Foundry install
6464
if: contains( ${{ matrix.target }}, 'apple')
6565
uses: foundry-rs/foundry-toolchain@v1
66-
with:
67-
version: "v0.3.0"
6866

6967
- name: Install protobuf
7068
if: contains( ${{ matrix.target }}, 'apple')

.github/workflows/unit.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434

3535
- name: Install Foundry
3636
uses: foundry-rs/foundry-toolchain@v1
37-
with:
38-
version: "v0.3.0"
3937

4038
- name: Install latest nextest release
4139
uses: taiki-e/install-action@nextest

Cargo.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ serde_json = "1.0.128"
9191
rand = "0.8.5"
9292
reqwest = { version = "0.12.8", default-features = false, features = ["rustls-tls"] }
9393
thiserror = "1.0.64"
94-
tokio = { version = "1.39.3", default-features = false, features = ["rt", "sync", "time"] }
94+
tokio = { version = "1.44.2", default-features = false, features = ["rt", "sync", "time"] }
9595
tokio-util = "0.7.12"
9696
tonic = "0.12.3"
9797
tonic-build = "0.12.3"

crates/builder/src/bundle_sender.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ where
381381

382382
if !is_success {
383383
if let Err(e) = self.process_revert(tx_hash).await {
384-
error!("Failed to process revert for bundle transaction {tx_hash:?}: {e:#?}");
384+
warn!("Failed to process revert for bundle transaction {tx_hash:?}: {e:#?}");
385385
}
386386
}
387387

crates/builder/src/transaction_tracker.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ where
329329
)));
330330
};
331331

332+
let sent_at_time = Instant::now();
332333
let tx_hash = self
333334
.sender
334335
.send_transaction(tx, expected_storage, &self.signer)
@@ -344,7 +345,7 @@ where
344345
gas_fees,
345346
attempt_number: self.attempt_count,
346347
sent_at_block: Some(block_number),
347-
sent_at_time: Some(Instant::now()),
348+
sent_at_time: Some(sent_at_time),
348349
});
349350
self.has_abandoned = false;
350351
self.attempt_count += 1;

0 commit comments

Comments
 (0)