Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Merge pull request #736 from iotaledger/fix/broken-error-checks
Browse files Browse the repository at this point in the history
Fix broken error checks
  • Loading branch information
muXxer authored Feb 14, 2024
2 parents 9adbc01 + 341a545 commit d22845f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/protocol/blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (b *Blocks) ProcessResponse(block *model.Block, from peer.ID) {
b.workerPool.Submit(func() {
// abort if the commitment belongs to an evicted slot
commitment, err := b.protocol.Commitments.Get(block.ProtocolBlock().Header.SlotCommitmentID, true)
if err != nil && ierrors.Is(ErrorSlotEvicted, err) {
if err != nil && ierrors.Is(err, ErrorSlotEvicted) {
b.LogError("dropped block referencing unsolidifiable commitment", "commitmentID", block.ProtocolBlock().Header.SlotCommitmentID, "blockID", block.ID(), "err", err)

return
Expand Down
2 changes: 1 addition & 1 deletion pkg/protocol/engine/ledger/ledger/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func (l *Ledger) OutputOrSpent(outputID iotago.OutputID) (*utxoledger.Output, *u
stateRef := mempool.UTXOInputStateRefFromInput(outputID.UTXOInput())
stateWithMetadata, err := l.memPool.StateMetadata(stateRef)
if err != nil {
if ierrors.Is(iotago.ErrInputAlreadySpent, err) {
if ierrors.Is(err, iotago.ErrInputAlreadySpent) {
l.utxoLedger.ReadLockLedger()
defer l.utxoLedger.ReadUnlockLedger()

Expand Down

0 comments on commit d22845f

Please sign in to comment.