mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
preserve txo status when updating node outputs
This commit is contained in:
parent
d24243ce20
commit
8e50815a3f
1 changed files with 2 additions and 0 deletions
|
@ -138,6 +138,8 @@ public class WalletNode extends Persistable implements Comparable<WalletNode> {
|
|||
if(!transactionOutputs.isEmpty()) {
|
||||
Optional<String> optionalLabel = transactionOutputs.stream().filter(oldTxo -> oldTxo.getHash().equals(txo.getHash()) && oldTxo.getIndex() == txo.getIndex()).map(BlockTransactionHash::getLabel).filter(Objects::nonNull).findFirst();
|
||||
optionalLabel.ifPresent(txo::setLabel);
|
||||
Optional<Status> optionalStatus = transactionOutputs.stream().filter(oldTxo -> oldTxo.getHash().equals(txo.getHash()) && oldTxo.getIndex() == txo.getIndex()).map(BlockTransactionHashIndex::getStatus).filter(Objects::nonNull).findFirst();
|
||||
optionalStatus.ifPresent(txo::setStatus);
|
||||
}
|
||||
|
||||
if(!wallet.getDetachedLabels().isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue