nack offer availability request if disconnected from xmr node

This commit is contained in:
woodser 2025-03-09 09:50:20 -04:00
parent 05778cac8d
commit abe3658fc9
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF

View file

@ -1557,6 +1557,14 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
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);