Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Farber98 committed Dec 3, 2024
1 parent cef6a91 commit 3b3a71b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions pkg/solana/txm/pendingtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,13 @@ func (c *pendingTxContext) OnReorg(sig solana.Signature) (pendingTx, error) {
if !exists {
return "", ErrSigDoesNotExist
}
var broadcastedProcessedExists, confirmedExists bool
if tx, broadcastedProcessedExists := c.broadcastedProcessedTxs[info.id]; broadcastedProcessedExists {

tx, broadcastedProcessedExists := c.broadcastedProcessedTxs[info.id]
if broadcastedProcessedExists {
pTx = tx
}
if tx, confirmedExists := c.confirmedTxs[info.id]; confirmedExists {
tx, confirmedExists := c.confirmedTxs[info.id]
if confirmedExists {
pTx = tx
}

Expand Down
5 changes: 3 additions & 2 deletions pkg/solana/txm/pendingtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ func TestPendingTxContext_add_remove_multiple(t *testing.T) {
sig, cancel := newProcess()
msg := pendingTx{id: uuid.NewString()}
err := txs.New(msg)
require.NoError(t, err)
assert.NoError(t, err)
err = txs.AddSignature(cancel, msg.id, sig)
require.NoError(t, err)
assert.NoError(t, err)
ids[sig] = msg.id
}

Expand Down Expand Up @@ -1024,6 +1024,7 @@ func TestPendingTxContext_expired(t *testing.T) {
err := txs.New(msg)
assert.NoError(t, err)
err = txs.AddSignature(cancel, msg.id, sig)
assert.NoError(t, err)

msg, exists := txs.broadcastedProcessedTxs[msg.id]
require.True(t, exists)
Expand Down

0 comments on commit 3b3a71b

Please sign in to comment.