Skip to content

Commit

Permalink
Merge pull request #2928 from a123b/fix-market-price-disagreement-ack…
Browse files Browse the repository at this point in the history
…message

Use tempTradingPeerNodeAddress if the trade doesn't have a trading peer set yet
  • Loading branch information
sqrrm authored Jun 29, 2019
2 parents e13faba + affa1b1 commit e33956c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ private void sendAckMessage(@Nullable TradeMessage tradeMessage, boolean result,
tradeId,
result,
errorMessage);
final NodeAddress peersNodeAddress = trade.getTradingPeerNodeAddress();
// If there was an error during offer verification, the tradingPeerNodeAddress of the trade might not be set yet.
// We can find the peer's node address in the processModel's tempTradingPeerNodeAddress in that case.
final NodeAddress peersNodeAddress = trade.getTradingPeerNodeAddress() != null ? trade.getTradingPeerNodeAddress() : processModel.getTempTradingPeerNodeAddress();
log.info("Send AckMessage for {} to peer {}. tradeId={}, sourceUid={}",
ackMessage.getSourceMsgClassName(), peersNodeAddress, tradeId, sourceUid);
String finalSourceUid = sourceUid;
Expand Down

0 comments on commit e33956c

Please sign in to comment.