[bisq-network/bisq] Avoid case of multi trades with same offer (#4889)

chimp1984 notifications at github.com
Thu Dec 3 23:40:32 CET 2020


@chimp1984 commented on this pull request.



>          }
         TradeProtocol tradeProtocol = TradeProtocolFactory.getNewTradeProtocol(trade);
-        tradeProtocolByTradeId.put(trade.getId(), tradeProtocol);
+        TradeProtocol prev = tradeProtocolByTradeId.put(trade.getUid(), tradeProtocol);
+        if (prev != null) {
+            log.error("We had already an entry with uid {}", trade.getUid());

If for some reason the same trade is entering those methods. Should not be possible but prefer to keep the log to detect it if there is still some bug.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4889#discussion_r535695958
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201203/3456bcb0/attachment.htm>


More information about the bisq-github mailing list