Skip to content

Commit

Permalink
Use tempTradingPeerNodeAddress if the trade doesn't have a trading pe…
Browse files Browse the repository at this point in the history
  • Loading branch information
a123b committed Jun 28, 2019
1 parent e13faba commit d6fa7b3
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.hasTradingPeerNodeAddress() ? 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 d6fa7b3

Please sign in to comment.