arbitrator verifies offer not signed before

This commit is contained in:
woodser 2023-08-15 15:53:12 -04:00
parent 20f26ea623
commit 9fb5dfb788

View file

@ -1138,10 +1138,10 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
}
// verify offer not seen before
Optional<OpenOffer> openOfferOptional = getOpenOfferById(request.offerId); // TODO: check if offer is on books, not open offer
if (openOfferOptional.isPresent()) {
errorMessage = "We already got a request to sign offer id " + request.offerId;
log.info(errorMessage);
Optional<SignedOffer> signedOfferOptional = getSignedOfferById(request.offerId);
if (signedOfferOptional.isPresent()) {
errorMessage = "We already signed offer id " + request.offerId;
log.warn(errorMessage);
sendAckMessage(request.getClass(), peer, request.getPubKeyRing(), request.getOfferId(), request.getUid(), false, errorMessage);
return;
}