keep the label and status of outputs at an address the server briefly reports without history
What changed, and why it matters
This commit changes how Sparrow Wallet handles a temporary server state where an address appears to have no transaction history. Previously, the wallet would wipe all transaction outputs tied to that address, which could also erase user labels and status markers. The fix uses a gentler update method that preserves labels and status while still clearing stale data. It is a defensive fix against a potential data-loss or UI-confusion bug, not a clear-cut remote exploit.
Treat as a low-to-moderate reliability/security improvement. Review the drongo submodule bump for related changes. No immediate emergency response is warranted, but users relying on output labels should update when convenient.
Security signals we found
Defensive fix for data-loss scenario during server synchronization
Change from destructive clear() to metadata-preserving update method
Subtle state-management bug in wallet history fetching
Evidence from the diff
In ElectrumServer.java, the code path that clears transaction history when a server reports an address with no history was changed from node.getTransactionOutputs().clear() to node.updateTransactionOutputs(node.getWallet(), Collections.emptySet()). The new method likely preserves metadata (labels, status) associated with outputs while removing the outputs themselves. The drongo submodule was also bumped. The change is small and defensive, aimed at preventing loss of user metadata during a transient server inconsistency.
Changed components
src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.javadrongo submoduleInspect captured patch +2 / −2
### drongo
@@ -1 +1 @@
-Subproject commit 1162ab4e2f051813fda1091a82cf3bdf7f323cb5
+Subproject commit 482bdce1bf0604cfb3d7eaced55970688aae52af
### src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java
@@ -582,7 +582,7 @@ private boolean fetchAndCalculateWalletHistory(Wallet wallet, List<Wallet> filte
if(retrievedScriptHashes.get(scriptHash) == null && !node.getTransactionOutputs().isEmpty()
&& (invalidatedBeforeFetch.contains(scriptHash) || !invalidatedScriptHashes.contains(scriptHash))) {
log.debug("Clearing transaction history for " + node);
- node.getTransactionOutputs().clear();
+ node.updateTransactionOutputs(node.getWallet(), Collections.emptySet());
}
}
}Why this scored 45/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.