diff --git a/pkg/solana/txm/pendingtx.go b/pkg/solana/txm/pendingtx.go index 72a2e461f..f8b76830f 100644 --- a/pkg/solana/txm/pendingtx.go +++ b/pkg/solana/txm/pendingtx.go @@ -300,7 +300,7 @@ func (c *pendingTxContext) OnProcessed(sig solana.Signature) (string, error) { if !sigExists { return info.id, ErrSigDoesNotExist } - tx, exists := c.broadcastedProcessedTxs[info.id] + _, exists := c.broadcastedProcessedTxs[info.id] if !exists { return info.id, ErrTransactionNotFound } @@ -308,7 +308,6 @@ func (c *pendingTxContext) OnProcessed(sig solana.Signature) (string, error) { info.state = Processed // save updated sig and tx back to the maps c.sigToTxInfo[sig] = info - c.broadcastedProcessedTxs[info.id] = tx return info.id, nil }) } diff --git a/pkg/solana/txm/txm.go b/pkg/solana/txm/txm.go index 4c2e1cd6b..d46d8c38b 100644 --- a/pkg/solana/txm/txm.go +++ b/pkg/solana/txm/txm.go @@ -465,27 +465,23 @@ func (txm *Txm) processConfirmations(ctx context.Context, client client.ReaderWr continue } - // check if a potential re-org has occurred for this sig and handle it - err := txm.handleReorg(ctx, sig, status) - if err != nil { - continue - } - switch status.ConfirmationStatus { case rpc.ConfirmationStatusProcessed: // if signature is processed, keep polling for confirmed or finalized status txm.handleProcessedSignatureStatus(sig) - continue case rpc.ConfirmationStatusConfirmed: // if signature is confirmed, keep polling for finalized status txm.handleConfirmedSignatureStatus(sig) - continue case rpc.ConfirmationStatusFinalized: // if signature is finalized, end polling txm.handleFinalizedSignatureStatus(sig) - continue default: txm.lggr.Warnw("unknown confirmation status", "signature", sig, "status", status.ConfirmationStatus) + } + + // check if a potential re-org has occurred for this sig and handle it + err := txm.handleReorg(ctx, sig, status) + if err != nil { continue } }