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
@Override
public void onFault(String errorMessage) {
log.warn("Arbitrator unavailable: {}", errorMessage);
log.warn("Arbitrator {} unavailable: {}", arbitratorNodeAddress, errorMessage);
excludedArbitrators.add(arbitratorNodeAddress);
Arbitrator altArbitrator = DisputeAgentSelection.getRandomArbitrator(model.getArbitratorManager(), excludedArbitrators);
if (altArbitrator == null) {

View File

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

View File

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