Apply fixes to stateService

This commit is contained in:
Manfred Karrer 2018-07-07 18:57:02 +02:00
parent d9ce3cf55e
commit 0d39aad91f
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46

View File

@ -133,9 +133,10 @@ class LockedBsqTxListItem {
public boolean isSpent() {
Optional<TxOutput> optionalTxOutput = stateService.getLockedTxOutput(txId);
if (optionalTxOutput.isPresent())
return !stateService.isUnspent(optionalTxOutput.get());
return true;
if (!optionalTxOutput.isPresent())
return true;
return !stateService.isUnspent(optionalTxOutput.get().getKey());
}
public TxType getTxType() {