save wallet on same thread to avoid disconnect on awake from standby

This commit is contained in:
woodser 2023-07-29 07:51:15 -04:00
parent 39b8afa528
commit 12b6585779
3 changed files with 4 additions and 4 deletions

View File

@ -133,7 +133,7 @@ public class MakerSendSignOfferRequest extends Task<PlaceOfferModel> {
// if unavailable, try alternative arbitrator // if unavailable, try alternative arbitrator
@Override @Override
public void onFault(String errorMessage) { public void onFault(String errorMessage) {
log.warn("Arbitrator unavailable: {}", errorMessage); log.warn("Arbitrator {} unavailable: {}", arbitratorNodeAddress, errorMessage);
excludedArbitrators.add(arbitratorNodeAddress); excludedArbitrators.add(arbitratorNodeAddress);
Arbitrator altArbitrator = DisputeAgentSelection.getRandomArbitrator(model.getArbitratorManager(), excludedArbitrators); Arbitrator altArbitrator = DisputeAgentSelection.getRandomArbitrator(model.getArbitratorManager(), excludedArbitrators);
if (altArbitrator == null) { if (altArbitrator == null) {

View File

@ -67,7 +67,7 @@ public class ProcessDepositsConfirmedMessage extends TradeTask {
trade.importMultisigHex(); trade.importMultisigHex();
// save wallet off thread // save wallet off thread
new Thread(() -> trade.saveWallet()).start(); trade.saveWallet();
// persist and complete // persist and complete
processModel.getTradeManager().requestPersistence(); processModel.getTradeManager().requestPersistence();

View File

@ -64,8 +64,8 @@ public class ProcessPaymentSentMessage extends TradeTask {
// import multisig hex // import multisig hex
trade.importMultisigHex(); trade.importMultisigHex();
// save wallet off thread // save wallet
new Thread(() -> trade.saveWallet()).start(); trade.saveWallet();
// update state // update state
trade.advanceState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG); trade.advanceState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);