Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Dec 22, 2023
1 parent a1b9a7a commit ab299db
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions vms/platformvm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package platformvm

import (
"context"
"errors"
"fmt"
"net/http"

Expand Down Expand Up @@ -487,6 +488,14 @@ func (vm *VM) GetBlockIDAtHeight(_ context.Context, height uint64) (ids.ID, erro
// Invariant: tx should not be referenced again without the context lock
// held to avoid any data races.
func (vm *VM) issueTx(ctx context.Context, tx *txs.Tx) error {
//TODO check duplicate tx error
return vm.Network.IssueTx(ctx, tx)
err := vm.Network.IssueTx(ctx, tx)
if err != nil && !errors.Is(err, mempool.ErrDuplicateTx) {
vm.ctx.Log.Debug("failed to add tx to mempool",
zap.Stringer("txID", tx.ID()),
zap.Error(err),
)
return err
}

return nil
}

0 comments on commit ab299db

Please sign in to comment.