Skip to content

Commit

Permalink
nack offer availability request if disconnected from xmr node
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Mar 10, 2025
1 parent 251a973 commit 00a2a7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/main/java/haveno/core/offer/OpenOfferManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,14 @@ private void handleOfferAvailabilityRequest(OfferAvailabilityRequest request, No
return;
}

// Don't allow trade start if not connected to Monero node
if (!Boolean.TRUE.equals(xmrConnectionService.isConnected())) {
errorMessage = "We got a handleOfferAvailabilityRequest but we are not connected to a Monero node.";
log.info(errorMessage);
sendAckMessage(request.getClass(), peer, request.getPubKeyRing(), request.getOfferId(), request.getUid(), false, errorMessage);
return;
}

if (stopped) {
errorMessage = "We have stopped already. We ignore that handleOfferAvailabilityRequest call.";
log.debug(errorMessage);
Expand Down

0 comments on commit 00a2a7c

Please sign in to comment.