mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
add comments
This commit is contained in:
parent
9bbf1f0e78
commit
5a47ebbadc
@ -105,8 +105,6 @@ public class CurrencyUtil {
|
||||
result.add(new CryptoCurrency("BTS", "BitShares"));
|
||||
result.add(new CryptoCurrency("XCP", "Counterparty"));
|
||||
result.add(new CryptoCurrency("XRP", "Ripple"));
|
||||
result.add(new CryptoCurrency("QRK", "Quark"));
|
||||
result.add(new CryptoCurrency("WDC", "WorldCoin"));
|
||||
|
||||
// Unfortunately we cannot support CryptoNote coins yet as there is no way to proof the transaction. Payment ID helps only locate the tx but the
|
||||
// arbitrator cannot see if the receiving key matches the receivers address. They might add support for exposing the tx key, but that is not
|
||||
|
@ -554,6 +554,8 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||
|
||||
@Override
|
||||
public void onBroadcastedToFirstPeer(BroadcastMessage message) {
|
||||
// The reason for that check was to separate different callback for different send calls.
|
||||
// We only want to notify our sendMailboxMessageListener for the calls he is interested in.
|
||||
if (message instanceof AddDataMessage &&
|
||||
((AddDataMessage) message).protectedStorageEntry.equals(protectedMailboxStorageEntry)) {
|
||||
sendMailboxMessageListener.onStoredInMailbox();
|
||||
@ -568,12 +570,15 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||
|
||||
@Override
|
||||
public void onBroadcastFailed(String errorMessage) {
|
||||
//sendMailboxMessageListener.onFault("Broadcast completed without any successful broadcast");
|
||||
// TODO investigate why not sending sendMailboxMessageListener.onFault. Related probably
|
||||
// to the logic from BroadcastHandler.sendToPeer
|
||||
}
|
||||
};
|
||||
boolean result = p2PDataStorage.add(protectedMailboxStorageEntry, networkNode.getNodeAddress(), listener, true);
|
||||
if (!result) {
|
||||
//TODO remove and add again with a delay to ensure the data will be broadcasted
|
||||
// The p2PDataStorage.remove makes probably sense but need to be analysed more.
|
||||
// Don't change that if it is not 100% clear.
|
||||
sendMailboxMessageListener.onFault("Data already exists in our local database");
|
||||
boolean removeResult = p2PDataStorage.remove(protectedMailboxStorageEntry, networkNode.getNodeAddress(), true);
|
||||
log.debug("remove result=" + removeResult);
|
||||
|
Loading…
x
Reference in New Issue
Block a user