mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 12:26:45 +00:00
various whirlpool-related improvements
This commit is contained in:
parent
ea03dece72
commit
2fa47e640d
5 changed files with 19 additions and 8 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 9a9a1b925461ee2a8ae7f6885309b0babd4b6767
|
||||
Subproject commit e0302cef22a3dd9401f9070318fec5ea15543bd7
|
|
@ -912,6 +912,11 @@ public class AppController implements Initializable {
|
|||
whirlpool.setHDWallet(storage.getWalletId(wallet), copy);
|
||||
}
|
||||
|
||||
StandardAccount standardAccount = wallet.getStandardAccountType();
|
||||
if(standardAccount != null && standardAccount.getMinimumGapLimit() != null && wallet.gapLimit() == null) {
|
||||
wallet.setGapLimit(standardAccount.getMinimumGapLimit());
|
||||
}
|
||||
|
||||
for(int i = 0; i < wallet.getKeystores().size(); i++) {
|
||||
Keystore keystore = wallet.getKeystores().get(i);
|
||||
if(keystore.hasSeed()) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class MixStatusCell extends TreeTableCell<Entry, UtxoEntry.MixStatus> {
|
|||
if(mixFailReason != MixFailReason.CANCEL) {
|
||||
setGraphic(getFailGlyph());
|
||||
Tooltip tt = new Tooltip();
|
||||
tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError));
|
||||
tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError) + "\nMake sure your internet connection is stable and the computer is configured to prevent sleeping.");
|
||||
setTooltip(tt);
|
||||
} else {
|
||||
setGraphic(null);
|
||||
|
|
|
@ -77,6 +77,8 @@ public class Whirlpool {
|
|||
private String walletId;
|
||||
private String mixToWalletId;
|
||||
|
||||
private StartupService startupService;
|
||||
|
||||
private final BooleanProperty startingProperty = new SimpleBooleanProperty(false);
|
||||
private final BooleanProperty stoppingProperty = new SimpleBooleanProperty(false);
|
||||
private final BooleanProperty mixingProperty = new SimpleBooleanProperty(false);
|
||||
|
@ -262,6 +264,15 @@ public class Whirlpool {
|
|||
httpClientService.shutdown();
|
||||
}
|
||||
|
||||
public StartupService createStartupService() {
|
||||
if(startupService != null) {
|
||||
startupService.cancel();
|
||||
}
|
||||
|
||||
startupService = new StartupService(this);
|
||||
return startupService;
|
||||
}
|
||||
|
||||
private WalletUtxo getUtxo(WhirlpoolUtxo whirlpoolUtxo) {
|
||||
Wallet wallet = AppServices.get().getWallet(walletId);
|
||||
if(wallet != null) {
|
||||
|
|
|
@ -29,7 +29,6 @@ public class WhirlpoolServices {
|
|||
private static final Logger log = LoggerFactory.getLogger(WhirlpoolServices.class);
|
||||
|
||||
private final Map<String, Whirlpool> whirlpoolMap = new HashMap<>();
|
||||
private Whirlpool.StartupService startupService;
|
||||
|
||||
public Whirlpool getWhirlpool(Wallet wallet) {
|
||||
Wallet masterWallet = wallet.isMasterWallet() ? wallet : wallet.getMasterWallet();
|
||||
|
@ -88,11 +87,7 @@ public class WhirlpoolServices {
|
|||
}
|
||||
}
|
||||
|
||||
if(startupService != null) {
|
||||
startupService.cancel();
|
||||
}
|
||||
|
||||
startupService = new Whirlpool.StartupService(whirlpool);
|
||||
Whirlpool.StartupService startupService = whirlpool.createStartupService();
|
||||
startupService.setPeriod(Duration.minutes(2));
|
||||
startupService.setOnSucceeded(workerStateEvent -> {
|
||||
startupService.cancel();
|
||||
|
|
Loading…
Reference in a new issue