mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
improve debug logging for wallet history updates
This commit is contained in:
parent
17bb442c78
commit
18bc7bf302
2 changed files with 3 additions and 3 deletions
|
@ -156,7 +156,7 @@ public class ElectrumServer {
|
||||||
|
|
||||||
if(!newReferences.isEmpty()) {
|
if(!newReferences.isEmpty()) {
|
||||||
//Look for additional nodes to fetch history for by considering the inputs and outputs of new transactions found
|
//Look for additional nodes to fetch history for by considering the inputs and outputs of new transactions found
|
||||||
log.debug("Found new transactions: " + newReferences);
|
log.debug(wallet.getName() + " found new transactions: " + newReferences);
|
||||||
Set<WalletNode> additionalNodes = new HashSet<>();
|
Set<WalletNode> additionalNodes = new HashSet<>();
|
||||||
Map<String, WalletNode> walletScriptHashes = getAllScriptHashes(wallet);
|
Map<String, WalletNode> walletScriptHashes = getAllScriptHashes(wallet);
|
||||||
for(BlockTransactionHash reference : newReferences) {
|
for(BlockTransactionHash reference : newReferences) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class WalletForm {
|
||||||
public void refreshHistory(Integer blockHeight, WalletNode node) {
|
public void refreshHistory(Integer blockHeight, WalletNode node) {
|
||||||
Wallet previousWallet = wallet.copy();
|
Wallet previousWallet = wallet.copy();
|
||||||
if(wallet.isValid() && AppServices.isOnline()) {
|
if(wallet.isValid() && AppServices.isOnline()) {
|
||||||
log.debug(node == null ? "Refreshing full wallet history" : "Requesting node wallet history for " + node.getDerivationPath());
|
log.debug(node == null ? wallet.getName() + " refreshing full wallet history" : wallet.getName() + " requesting node wallet history for " + node.getDerivationPath());
|
||||||
ElectrumServer.TransactionHistoryService historyService = new ElectrumServer.TransactionHistoryService(wallet, getWalletTransactionNodes(node));
|
ElectrumServer.TransactionHistoryService historyService = new ElectrumServer.TransactionHistoryService(wallet, getWalletTransactionNodes(node));
|
||||||
historyService.setOnSucceeded(workerStateEvent -> {
|
historyService.setOnSucceeded(workerStateEvent -> {
|
||||||
EventManager.get().post(new WalletHistoryStatusEvent(wallet, true));
|
EventManager.get().post(new WalletHistoryStatusEvent(wallet, true));
|
||||||
|
@ -248,7 +248,7 @@ public class WalletForm {
|
||||||
if(wallet.isValid()) {
|
if(wallet.isValid()) {
|
||||||
WalletNode walletNode = event.getWalletNode(wallet);
|
WalletNode walletNode = event.getWalletNode(wallet);
|
||||||
if(walletNode != null) {
|
if(walletNode != null) {
|
||||||
log.debug(wallet.getName() + " history event for node " + walletNode);
|
log.debug(wallet.getName() + " history event for node " + walletNode + " (" + event.getScriptHash() + ")");
|
||||||
refreshHistory(AppServices.getCurrentBlockHeight(), walletNode);
|
refreshHistory(AppServices.getCurrentBlockHeight(), walletNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue