Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ impl NonceManagerState {
old_nonce: &Option<U256>,
) -> NonceResult<U256> {
if let Some(nonce) = old_nonce {
// If the different nonce was assigned to the transaction,
// we clear the tracked nonce for the transaction first.
warn!(
?nonce,
"Reassigning nonce to transaction, clearing currently tracked nonce"
);
self.clear_tracked_tx_uuid(nonce).await?;
self.clear_tracked_tx_nonce(tx_uuid).await?;
// Only clear nonce and tx_uuid linkage if the old_nonce is indeed associated with the tx_uuid in question
if *tx_uuid == self.get_tracked_tx_uuid(&nonce).await? {
// If the different nonce was assigned to the transaction,
// we clear the tracked nonce for the transaction first.
warn!(
?nonce,
"Reassigning nonce to transaction, clearing currently tracked nonce"
);
self.clear_tracked_tx_uuid(nonce).await?;
self.clear_tracked_tx_nonce(tx_uuid).await?;
}
}

let (finalized_nonce, upper_nonce) = self.get_boundary_nonces().await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ impl BuildingStage {
return Ok(());
};
info!(?tx, "Transaction built successfully");
self.state.store_tx(&tx).await;
Comment thread
yjamin marked this conversation as resolved.
// Only send tx to inclusino stage after we stored it
// This prevents TX to drop in case the send over fails
Comment thread
yjamin marked this conversation as resolved.
Outdated
call_until_success_or_nonretryable_error(
|| self.send_tx_to_inclusion_stage(tx.clone()),
"Sending transaction to inclusion stage",
&self.state,
)
.await?;
self.state.store_tx(&tx).await;
Ok(())
}

Expand Down
Loading