|
1 | | -use alloy::providers::Provider; |
| 1 | +use alloy::{consensus::Transaction, providers::Provider}; |
2 | 2 | use engine_core::{chain::Chain, error::AlloyRpcErrorToEngineError}; |
3 | 3 |
|
4 | 4 | use crate::eoa::{ |
5 | | - store::{BorrowedTransaction, PendingTransaction, SubmissionResult}, |
| 5 | + EoaExecutorStore, |
| 6 | + store::{BorrowedTransaction, PendingTransaction, SubmissionResult, SubmissionResultType}, |
6 | 7 | worker::{ |
| 8 | + EoaExecutorWorker, |
7 | 9 | error::{ |
8 | | - is_retryable_preparation_error, should_update_balance_threshold, EoaExecutorWorkerError, SendContext |
9 | | - }, EoaExecutorWorker |
10 | | - }, EoaExecutorStore, |
| 10 | + EoaExecutorWorkerError, SendContext, is_retryable_preparation_error, |
| 11 | + should_update_balance_threshold, |
| 12 | + }, |
| 13 | + }, |
11 | 14 | }; |
12 | 15 |
|
13 | 16 | const HEALTH_CHECK_INTERVAL_MS: u64 = 60 * 5 * 1000; // 5 minutes in milliseconds |
@@ -391,12 +394,24 @@ impl<C: Chain> EoaExecutorWorker<C> { |
391 | 394 | .into_iter() |
392 | 395 | .zip(cleaned_results.into_iter()) |
393 | 396 | .map(|(send_result, borrowed_tx)| { |
394 | | - SubmissionResult::from_send_result( |
| 397 | + let result = SubmissionResult::from_send_result( |
395 | 398 | &borrowed_tx, |
396 | 399 | send_result, |
397 | 400 | SendContext::InitialBroadcast, |
398 | 401 | &self.chain, |
399 | | - ) |
| 402 | + ); |
| 403 | + |
| 404 | + match &result.result { |
| 405 | + SubmissionResultType::Success => result, |
| 406 | + SubmissionResultType::Nack(e) => { |
| 407 | + tracing::error!(error = ?e, transaction_id = borrowed_tx.transaction_id, nonce = borrowed_tx.data.signed_transaction.nonce(), "Transaction nack error during send"); |
| 408 | + result |
| 409 | + } |
| 410 | + SubmissionResultType::Fail(e) => { |
| 411 | + tracing::error!(error = ?e, transaction_id = borrowed_tx.transaction_id, nonce = borrowed_tx.data.signed_transaction.nonce(), "Transaction failed during send"); |
| 412 | + result |
| 413 | + } |
| 414 | + } |
400 | 415 | }) |
401 | 416 | .collect(); |
402 | 417 |
|
|
0 commit comments