Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(cli)!: replay transactions when forking at a tx hash #557

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
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
6 changes: 2 additions & 4 deletions crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ async fn main() -> anyhow::Result<()> {
}
}
Command::Fork(fork) => {
// TODO: For now, we do not replay earlier transactions when forking to keep compatibility
// with the legacy forking behavior.
let (fork_client, _) = if let Some(tx_hash) = fork.fork_transaction_hash {
let (fork_client, earlier_txs) = if let Some(tx_hash) = fork.fork_transaction_hash {
// If transaction hash is provided, we fork at the parent of block containing tx
ForkClient::at_before_tx(fork.fork_url.to_config(), tx_hash).await?
} else {
Expand All @@ -137,7 +135,7 @@ async fn main() -> anyhow::Result<()> {
};

update_with_fork_details(&mut config, &fork_client.details).await;
(Some(fork_client), Vec::new())
(Some(fork_client), earlier_txs)
}
Command::ReplayTx(replay_tx) => {
let (fork_client, earlier_txs) =
Expand Down
Loading