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

Commit 3673e39

Browse files
authored
Merge pull request #983 from iotaledger/fix/quantum-race
Fix Quantum calculation race
2 parents 97bab37 + 3002562 commit 3673e39

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

pkg/protocol/engine/ledger/ledger/ledger.go

-8
Original file line numberDiff line numberDiff line change
@@ -722,14 +722,6 @@ func (l *Ledger) resolveAccountOutput(accountID iotago.AccountID, slot iotago.Sl
722722
l.utxoLedger.ReadLockLedger()
723723
defer l.utxoLedger.ReadUnlockLedger()
724724

725-
isUnspent, err := l.utxoLedger.IsOutputIDUnspentWithoutLocking(accountMetadata.OutputID())
726-
if err != nil {
727-
return nil, ierrors.Wrapf(err, "error while checking whether account with output id %s is unspent", accountMetadata.OutputID().ToHex())
728-
}
729-
if !isUnspent {
730-
return nil, ierrors.WithMessagef(mempool.ErrStateNotFound, "unspent account with output id %s not found", accountMetadata.OutputID().ToHex())
731-
}
732-
733725
accountOutput, err := l.utxoLedger.ReadOutputByOutputIDWithoutLocking(accountMetadata.OutputID())
734726
if err != nil {
735727
return nil, ierrors.Wrapf(err, "error while retrieving account with output id %s", accountMetadata.OutputID().ToHex())

0 commit comments

Comments
 (0)