mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Add more logs
This commit is contained in:
parent
f3efe505bf
commit
57f66f35a3
@ -591,7 +591,7 @@ public class BisqSetup {
|
||||
tradeManager.getAddressEntriesForAvailableBalanceStream()
|
||||
.filter(addressEntry -> addressEntry.getOfferId() != null)
|
||||
.forEach(addressEntry -> {
|
||||
log.debug("swapPendingOfferFundingEntries, offerId={}, OFFER_FUNDING", addressEntry.getOfferId());
|
||||
log.warn("Swapping pending OFFER_FUNDING entries at startup. offerId={}", addressEntry.getOfferId());
|
||||
btcWalletService.swapTradeEntryToAvailableEntry(addressEntry.getOfferId(), AddressEntry.Context.OFFER_FUNDING);
|
||||
});
|
||||
|
||||
|
@ -656,6 +656,7 @@ public class BtcWalletService extends WalletService {
|
||||
}
|
||||
|
||||
public void resetAddressEntriesForOpenOffer(String offerId) {
|
||||
log.info("resetAddressEntriesForOpenOffer offerId={}", offerId);
|
||||
swapTradeEntryToAvailableEntry(offerId, AddressEntry.Context.OFFER_FUNDING);
|
||||
swapTradeEntryToAvailableEntry(offerId, AddressEntry.Context.RESERVED_FOR_TRADE);
|
||||
}
|
||||
|
@ -177,11 +177,13 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
}
|
||||
|
||||
private void cleanUpAddressEntries() {
|
||||
Set<String> openTradesIdSet = openOffers.getList().stream().map(OpenOffer::getId).collect(Collectors.toSet());
|
||||
Set<String> openOffersIdSet = openOffers.getList().stream().map(OpenOffer::getId).collect(Collectors.toSet());
|
||||
btcWalletService.getAddressEntriesForOpenOffer().stream()
|
||||
.filter(e -> !openTradesIdSet.contains(e.getOfferId()))
|
||||
.filter(e -> !openOffersIdSet.contains(e.getOfferId()))
|
||||
.forEach(e -> {
|
||||
log.warn("We found an outdated addressEntry for openOffer {}", e.getOfferId());
|
||||
log.warn("We found an outdated addressEntry for openOffer {} (openOffers does not contain that " +
|
||||
"offer), offers.size={}",
|
||||
e.getOfferId(), openOffers.size());
|
||||
btcWalletService.resetAddressEntriesForOpenOffer(e.getOfferId());
|
||||
});
|
||||
}
|
||||
@ -483,7 +485,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
openOffer.setState(OpenOffer.State.CANCELED);
|
||||
openOffers.remove(openOffer);
|
||||
closedTradableManager.add(openOffer);
|
||||
log.debug("removeOpenOffer, offerId={}", offer.getId());
|
||||
log.info("onRemoved offerId={}", offer.getId());
|
||||
btcWalletService.resetAddressEntriesForOpenOffer(offer.getId());
|
||||
resultHandler.handleResult();
|
||||
}
|
||||
|
@ -114,6 +114,7 @@ public class MakerSetupDepositTxListener extends TradeTask {
|
||||
}
|
||||
|
||||
private void swapReservedForTradeEntry() {
|
||||
log.info("swapReservedForTradeEntry");
|
||||
processModel.getBtcWalletService().swapTradeEntryToAvailableEntry(trade.getId(), AddressEntry.Context.RESERVED_FOR_TRADE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user