log details on invalid maker signature

This commit is contained in:
woodser 2024-03-22 09:46:54 -04:00
parent d9b983b0fb
commit 9661e6fba8

View file

@ -377,7 +377,14 @@ public class HavenoUtils {
String tradeRequestAsJson = JsonUtil.objectToJson(signedRequest);
// verify maker signature
return isSignatureValid(makerPubKeyRing, tradeRequestAsJson, signature);
boolean isSignatureValid = isSignatureValid(makerPubKeyRing, tradeRequestAsJson, signature);
if (!isSignatureValid) {
log.warn("Invalid maker signature for trade request: " + request.getTradeId() + " from " + request.getSenderNodeAddress().getAddressForDisplay());
log.warn("Trade request as json: " + tradeRequestAsJson);
log.warn("Maker pub key ring: " + (makerPubKeyRing == null ? null : "..."));
log.warn("Maker signature: " + (signature == null ? null : Utilities.bytesAsHexString(signature)));
}
return isSignatureValid;
}
/**