mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 22:45:21 +01:00
Merge pull request #3351 from chimp1984/fix-missing-addition-of-mediator
Add mediator prefix to trade statistics
This commit is contained in:
commit
95e9bd459d
1 changed files with 12 additions and 0 deletions
|
@ -64,6 +64,18 @@ public class PublishTradeStatistics extends TradeTask {
|
|||
extraDataMap.put(TradeStatistics2.ARBITRATOR_ADDRESS, address);
|
||||
}
|
||||
|
||||
NodeAddress mediatorNodeAddress = trade.getMediatorNodeAddress();
|
||||
if (mediatorNodeAddress != null) {
|
||||
// The first 4 chars are sufficient to identify an arbitrator.
|
||||
// For testing with regtest/localhost we use the full address as its localhost and would result in
|
||||
// same values for multiple arbitrators.
|
||||
NetworkNode networkNode = model.getProcessModel().getP2PService().getNetworkNode();
|
||||
String address = networkNode instanceof TorNetworkNode ?
|
||||
mediatorNodeAddress.getFullAddress().substring(0, 4) :
|
||||
mediatorNodeAddress.getFullAddress();
|
||||
extraDataMap.put(TradeStatistics2.MEDIATOR_ADDRESS, address);
|
||||
}
|
||||
|
||||
Offer offer = trade.getOffer();
|
||||
checkNotNull(offer, "offer must not ne null");
|
||||
checkNotNull(trade.getTradeAmount(), "trade.getTradeAmount() must not ne null");
|
||||
|
|
Loading…
Add table
Reference in a new issue