File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,10 @@ func (t *BatchTxPool) Add(
184184 }
185185
186186 if err != nil {
187+ t .logger .Error ().Err (err ).Msgf (
188+ "failed to submit single Flow transaction for EOA: %s" ,
189+ from .Hex (),
190+ )
187191 return err
188192 }
189193
@@ -227,7 +231,7 @@ func (t *BatchTxPool) processPooledTransactions(ctx context.Context) {
227231 )
228232 if err != nil {
229233 t .logger .Error ().Err (err ).Msgf (
230- "failed to submit Flow transaction from BatchTxPool for EOA: %s" ,
234+ "failed to submit batch Flow transaction for EOA: %s" ,
231235 address .Hex (),
232236 )
233237 continue
@@ -274,6 +278,9 @@ func (t *BatchTxPool) batchSubmitTransactionsForSameAddress(
274278 }
275279
276280 if err := t .client .SendTransaction (ctx , * flowTx ); err != nil {
281+ // If there was any error while sending the transaction,
282+ // we record all transactions as dropped.
283+ t .collector .TransactionsDropped (len (hexEncodedTxs ))
277284 return err
278285 }
279286
@@ -305,6 +312,9 @@ func (t *BatchTxPool) submitSingleTransaction(
305312 }
306313
307314 if err := t .client .SendTransaction (ctx , * flowTx ); err != nil {
315+ // If there was any error while sending the transaction,
316+ // we record it as a dropped transaction.
317+ t .collector .TransactionsDropped (1 )
308318 return err
309319 }
310320
Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ func (t *SingleTxPool) Add(
9595) error {
9696 t .txPublisher .Publish (tx ) // publish pending transaction event
9797
98+ from , err := models .DeriveTxSender (tx )
99+ if err != nil {
100+ return err
101+ }
102+
98103 txData , err := tx .MarshalBinary ()
99104 if err != nil {
100105 return err
@@ -120,10 +125,21 @@ func (t *SingleTxPool) Add(
120125 // If there was any error during the transaction build
121126 // process, we record it as a dropped transaction.
122127 t .collector .TransactionsDropped (1 )
128+ t .logger .Error ().Err (err ).Msgf (
129+ "failed to build Flow transaction for EOA: %s" ,
130+ from .Hex (),
131+ )
123132 return err
124133 }
125134
126135 if err := t .client .SendTransaction (ctx , * flowTx ); err != nil {
136+ // If there was any error while sending the transaction,
137+ // we record it as a dropped transaction.
138+ t .collector .TransactionsDropped (1 )
139+ t .logger .Error ().Err (err ).Msgf (
140+ "failed to submit Flow transaction for EOA: %s" ,
141+ from .Hex (),
142+ )
127143 return err
128144 }
129145
You can’t perform that action at this time.
0 commit comments