From 9661e6fba85dcf2629819a18ef3045079edecbc0 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 22 Mar 2024 09:46:54 -0400 Subject: [PATCH] log details on invalid maker signature --- core/src/main/java/haveno/core/trade/HavenoUtils.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/haveno/core/trade/HavenoUtils.java b/core/src/main/java/haveno/core/trade/HavenoUtils.java index b2552cbeea..625cd48345 100644 --- a/core/src/main/java/haveno/core/trade/HavenoUtils.java +++ b/core/src/main/java/haveno/core/trade/HavenoUtils.java @@ -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; } /**