mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
remove warmup key derivation, indicate when creating wallet transaction is deriving keys
This commit is contained in:
parent
ac64811b35
commit
ebbc4289e1
3 changed files with 9 additions and 27 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit d489aa6af9e22e9b707570d9c19ab10aec0d0a28
|
||||
Subproject commit fefebbabb5202330de028abe05344a91cf602018
|
|
@ -1063,13 +1063,6 @@ public class AppServices {
|
|||
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
|
||||
Platform.runLater(() -> restartBwt(event.getWallet()));
|
||||
}
|
||||
|
||||
//Ensure public key cache is warm
|
||||
WalletKeyDerivationService walletKeyDerivationService = new WalletKeyDerivationService(event.getWallet());
|
||||
walletKeyDerivationService.setOnFailed(workerStateEvent -> {
|
||||
log.error("Error deriving public keys", workerStateEvent.getSource().getException());
|
||||
});
|
||||
walletKeyDerivationService.start();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
@ -1109,22 +1102,4 @@ public class AppServices {
|
|||
onlineProperty.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class WalletKeyDerivationService extends Service<Boolean> {
|
||||
private final Wallet wallet;
|
||||
|
||||
public WalletKeyDerivationService(Wallet wallet) {
|
||||
this.wallet = wallet;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Task<Boolean> createTask() {
|
||||
return new Task<>() {
|
||||
protected Boolean call() {
|
||||
wallet.copy().derivePublicKeys();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -599,7 +599,12 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
final WalletTransactionService currentWalletTransactionService = walletTransactionService;
|
||||
final KeyFrame delay = new KeyFrame(Duration.millis(200), e -> {
|
||||
if(currentWalletTransactionService.isRunning()) {
|
||||
transactionDiagram.update("Selecting UTXOs...");
|
||||
transactionDiagram.update(currentWalletTransactionService.getMessage());
|
||||
currentWalletTransactionService.messageProperty().addListener((observable1, oldValue, newValue) -> {
|
||||
if(currentWalletTransactionService.isRunning()) {
|
||||
transactionDiagram.update(newValue);
|
||||
}
|
||||
});
|
||||
createButton.setDisable(true);
|
||||
notificationButton.setDisable(true);
|
||||
}
|
||||
|
@ -677,8 +682,10 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
protected Task<WalletTransaction> createTask() {
|
||||
return new Task<>() {
|
||||
protected WalletTransaction call() throws InsufficientFundsException {
|
||||
updateMessage("Selecting UTXOs...");
|
||||
WalletTransaction walletTransaction = wallet.createWalletTransaction(utxoSelectors, utxoFilters, payments, opReturns, excludedChangeNodes,
|
||||
feeRate, longTermFeeRate, fee, currentBlockHeight, groupByAddress, includeMempoolOutputs, includeSpentMempoolOutputs);
|
||||
updateMessage("Deriving keys...");
|
||||
walletTransaction.updateAddressNodeMap(addressNodeMap, walletTransaction.getWallet());
|
||||
return walletTransaction;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue