Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tempTradingPeerNodeAddress if the trade doesn't have a trading peer set yet #2928

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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