mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-15 15:59:10 -05:00
Use Persistable interface for local db data
This commit is contained in:
parent
8792666f78
commit
6a25e1c56c
71 changed files with 216 additions and 196 deletions
|
|
@ -38,11 +38,11 @@ public class EncryptionService {
|
|||
}
|
||||
|
||||
public DecryptedMsgWithPubKey decryptAndVerify(SealedAndSigned sealedAndSigned) throws CryptoException {
|
||||
DecryptedPayloadWithPubKey decryptedPayloadWithPubKey = Encryption.decryptHybridWithSignature(sealedAndSigned,
|
||||
DecryptedDataTuple decryptedDataTuple = Encryption.decryptHybridWithSignature(sealedAndSigned,
|
||||
keyRing.getEncryptionKeyPair().getPrivate());
|
||||
if (decryptedPayloadWithPubKey.payload instanceof Message) {
|
||||
return new DecryptedMsgWithPubKey((Message) decryptedPayloadWithPubKey.payload,
|
||||
decryptedPayloadWithPubKey.sigPublicKey);
|
||||
if (decryptedDataTuple.payload instanceof Message) {
|
||||
return new DecryptedMsgWithPubKey((Message) decryptedDataTuple.payload,
|
||||
decryptedDataTuple.sigPublicKey);
|
||||
} else {
|
||||
throw new CryptoException("decryptedPayloadWithPubKey.payload is not instance of Message");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
package io.bitsquare.http;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
// TODO route over tor
|
||||
public class HttpClient implements Serializable {
|
||||
public class HttpClient {
|
||||
|
||||
private final String baseUrl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
package io.bitsquare.p2p;
|
||||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.common.crypto.Hash;
|
||||
import io.bitsquare.common.persistance.Persistable;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class NodeAddress implements Serializable {
|
||||
public class NodeAddress implements Persistable, Payload {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
||||
|
||||
public final String hostName;
|
||||
public final int port;
|
||||
transient private byte[] addressPrefixHash;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import com.google.inject.Inject;
|
|||
import com.google.inject.name.Named;
|
||||
import io.bitsquare.app.Log;
|
||||
import io.bitsquare.app.ProgramArguments;
|
||||
import io.bitsquare.common.ByteArray;
|
||||
import io.bitsquare.common.UserThread;
|
||||
import io.bitsquare.common.crypto.CryptoException;
|
||||
import io.bitsquare.common.crypto.KeyRing;
|
||||
|
|
@ -25,12 +24,8 @@ import io.bitsquare.p2p.peers.peerexchange.PeerExchangeManager;
|
|||
import io.bitsquare.p2p.seed.SeedNodesRepository;
|
||||
import io.bitsquare.p2p.storage.HashMapChangedListener;
|
||||
import io.bitsquare.p2p.storage.P2PDataStorage;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedData;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedMailboxData;
|
||||
import io.bitsquare.p2p.storage.data.RefreshTTLBundle;
|
||||
import io.bitsquare.p2p.storage.data.*;
|
||||
import io.bitsquare.p2p.storage.messages.AddDataMessage;
|
||||
import io.bitsquare.p2p.storage.messages.ExpirablePayload;
|
||||
import io.bitsquare.p2p.storage.messages.MailboxPayload;
|
||||
import javafx.beans.property.*;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import org.fxmisc.easybind.EasyBind;
|
||||
|
|
@ -737,7 +732,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
|||
return numConnectedPeers;
|
||||
}
|
||||
|
||||
public Map<ByteArray, ProtectedData> getDataMap() {
|
||||
public Map<P2PDataStorage.ByteArray, ProtectedData> getDataMap() {
|
||||
return p2PDataStorage.getMap();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
package io.bitsquare.p2p.peers.peerexchange;
|
||||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.common.persistance.Persistable;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ReportedPeer implements Serializable {
|
||||
public class ReportedPeer implements Payload, Persistable {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,14 @@ import io.bitsquare.common.UserThread;
|
|||
import io.bitsquare.common.crypto.CryptoException;
|
||||
import io.bitsquare.common.crypto.Hash;
|
||||
import io.bitsquare.common.crypto.Sig;
|
||||
import io.bitsquare.common.util.Tuple2;
|
||||
import io.bitsquare.common.persistance.Persistable;
|
||||
import io.bitsquare.common.util.Utilities;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
import io.bitsquare.p2p.Message;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
import io.bitsquare.p2p.network.*;
|
||||
import io.bitsquare.p2p.peers.Broadcaster;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedData;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedMailboxData;
|
||||
import io.bitsquare.p2p.storage.data.RefreshTTLBundle;
|
||||
import io.bitsquare.p2p.storage.data.*;
|
||||
import io.bitsquare.p2p.storage.messages.*;
|
||||
import io.bitsquare.storage.Storage;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -44,7 +43,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
private final Broadcaster broadcaster;
|
||||
private final Map<ByteArray, ProtectedData> map = new ConcurrentHashMap<>();
|
||||
private final CopyOnWriteArraySet<HashMapChangedListener> hashMapChangedListeners = new CopyOnWriteArraySet<>();
|
||||
private HashMap<ByteArray, Tuple2<Integer, Long>> sequenceNumberMap = new HashMap<>();
|
||||
private HashMap<ByteArray, MapValue> sequenceNumberMap = new HashMap<>();
|
||||
private final Storage<HashMap> storage;
|
||||
private final ScheduledThreadPoolExecutor removeExpiredEntriesExecutor;
|
||||
|
||||
|
|
@ -65,7 +64,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
}
|
||||
|
||||
private void init() {
|
||||
HashMap<ByteArray, Tuple2<Integer, Long>> persisted = storage.initAndGetPersisted("SequenceNumberMap");
|
||||
HashMap<ByteArray, MapValue> persisted = storage.initAndGetPersisted("SequenceNumberMap");
|
||||
if (persisted != null)
|
||||
sequenceNumberMap = getPurgedSequenceNumberMap(persisted);
|
||||
|
||||
|
|
@ -192,9 +191,9 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
// Republished data have a larger sequence number. We set the rePublish flag to enable broadcasting
|
||||
// even we had the data with the old seq nr. already
|
||||
if (sequenceNumberMap.containsKey(hashOfPayload) &&
|
||||
protectedData.sequenceNumber > sequenceNumberMap.get(hashOfPayload).first)
|
||||
protectedData.sequenceNumber > sequenceNumberMap.get(hashOfPayload).sequenceNr)
|
||||
|
||||
sequenceNumberMap.put(hashOfPayload, new Tuple2<>(protectedData.sequenceNumber, System.currentTimeMillis()));
|
||||
sequenceNumberMap.put(hashOfPayload, new MapValue(protectedData.sequenceNumber, System.currentTimeMillis()));
|
||||
storage.queueUpForSave(sequenceNumberMap, 5000);
|
||||
|
||||
StringBuilder sb = new StringBuilder("\n\n------------------------------------------------------------\n");
|
||||
|
|
@ -226,7 +225,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
ByteArray hashOfPayload = new ByteArray(refreshTTLBundle.hashOfPayload);
|
||||
|
||||
if (map.containsKey(hashOfPayload)) {
|
||||
if (sequenceNumberMap.containsKey(hashOfPayload) && sequenceNumberMap.get(hashOfPayload).first == sequenceNumber) {
|
||||
if (sequenceNumberMap.containsKey(hashOfPayload) && sequenceNumberMap.get(hashOfPayload).sequenceNr == sequenceNumber) {
|
||||
log.warn("We got that message with that seq nr already from another peer. We ignore that message.");
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -239,7 +238,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
ProtectedData storedData = map.get(hashOfPayload);
|
||||
storedData.refreshDate();
|
||||
|
||||
sequenceNumberMap.put(hashOfPayload, new Tuple2<>(sequenceNumber, System.currentTimeMillis()));
|
||||
sequenceNumberMap.put(hashOfPayload, new MapValue(sequenceNumber, System.currentTimeMillis()));
|
||||
storage.queueUpForSave(sequenceNumberMap, 5000);
|
||||
|
||||
StringBuilder sb = new StringBuilder("\n\n------------------------------------------------------------\n");
|
||||
|
|
@ -278,7 +277,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
|
||||
broadcast(new RemoveDataMessage(protectedData), sender);
|
||||
|
||||
sequenceNumberMap.put(hashOfPayload, new Tuple2<>(protectedData.sequenceNumber, System.currentTimeMillis()));
|
||||
sequenceNumberMap.put(hashOfPayload, new MapValue(protectedData.sequenceNumber, System.currentTimeMillis()));
|
||||
storage.queueUpForSave(sequenceNumberMap, 5000);
|
||||
} else {
|
||||
log.debug("remove failed");
|
||||
|
|
@ -303,7 +302,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
|
||||
broadcast(new RemoveMailboxDataMessage(protectedMailboxData), sender);
|
||||
|
||||
sequenceNumberMap.put(hashOfData, new Tuple2<>(protectedMailboxData.sequenceNumber, System.currentTimeMillis()));
|
||||
sequenceNumberMap.put(hashOfData, new MapValue(protectedMailboxData.sequenceNumber, System.currentTimeMillis()));
|
||||
storage.queueUpForSave(sequenceNumberMap, 5000);
|
||||
} else {
|
||||
log.debug("removeMailboxData failed");
|
||||
|
|
@ -321,7 +320,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
ByteArray hashOfData = getHashAsByteArray(payload);
|
||||
int sequenceNumber;
|
||||
if (sequenceNumberMap.containsKey(hashOfData))
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfData).first + 1;
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfData).sequenceNr + 1;
|
||||
else
|
||||
sequenceNumber = 0;
|
||||
|
||||
|
|
@ -335,7 +334,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
ByteArray hashOfPayload = getHashAsByteArray(payload);
|
||||
int sequenceNumber;
|
||||
if (sequenceNumberMap.containsKey(hashOfPayload))
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfPayload).first + 1;
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfPayload).sequenceNr + 1;
|
||||
else
|
||||
sequenceNumber = 0;
|
||||
|
||||
|
|
@ -351,7 +350,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
ByteArray hashOfData = getHashAsByteArray(expirableMailboxPayload);
|
||||
int sequenceNumber;
|
||||
if (sequenceNumberMap.containsKey(hashOfData))
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfData).first + 1;
|
||||
sequenceNumber = sequenceNumberMap.get(hashOfData).sequenceNr + 1;
|
||||
else
|
||||
sequenceNumber = 0;
|
||||
|
||||
|
|
@ -385,7 +384,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
|
||||
private boolean isSequenceNrValid(int newSequenceNumber, ByteArray hashOfData) {
|
||||
if (sequenceNumberMap.containsKey(hashOfData)) {
|
||||
Integer storedSequenceNumber = sequenceNumberMap.get(hashOfData).first;
|
||||
Integer storedSequenceNumber = sequenceNumberMap.get(hashOfData).sequenceNr;
|
||||
if (newSequenceNumber < storedSequenceNumber) {
|
||||
log.warn("Sequence number is invalid. newSequenceNumber="
|
||||
+ newSequenceNumber + " / storedSequenceNumber=" + storedSequenceNumber);
|
||||
|
|
@ -472,11 +471,11 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
return new ByteArray(Hash.getHash(data));
|
||||
}
|
||||
|
||||
private HashMap<ByteArray, Tuple2<Integer, Long>> getPurgedSequenceNumberMap(HashMap<ByteArray, Tuple2<Integer, Long>> persisted) {
|
||||
HashMap<ByteArray, Tuple2<Integer, Long>> purged = new HashMap<>();
|
||||
private HashMap<ByteArray, MapValue> getPurgedSequenceNumberMap(HashMap<ByteArray, MapValue> persisted) {
|
||||
HashMap<ByteArray, MapValue> purged = new HashMap<>();
|
||||
long maxAgeTs = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(10);
|
||||
persisted.entrySet().stream().forEach(entry -> {
|
||||
if (entry.getValue().second > maxAgeTs)
|
||||
if (entry.getValue().timeStamp > maxAgeTs)
|
||||
purged.put(entry.getKey(), entry.getValue());
|
||||
});
|
||||
return purged;
|
||||
|
|
@ -487,13 +486,18 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
// Static class
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Used as container for calculating cryptographic hash of data and sequenceNumber
|
||||
|
||||
/**
|
||||
* Used as container for calculating cryptographic hash of data and sequenceNumber.
|
||||
* Needs to be Serializable because we convert the object to a byte array via java serialization
|
||||
* before calculating the hash.
|
||||
*/
|
||||
public static final class DataAndSeqNrPair implements Serializable {
|
||||
// data are only used for calculating cryptographic hash from both values so they are kept private
|
||||
private final Serializable data;
|
||||
private final Payload data;
|
||||
private final int sequenceNumber;
|
||||
|
||||
public DataAndSeqNrPair(Serializable data, int sequenceNumber) {
|
||||
public DataAndSeqNrPair(Payload data, int sequenceNumber) {
|
||||
this.data = data;
|
||||
this.sequenceNumber = sequenceNumber;
|
||||
}
|
||||
|
|
@ -507,9 +511,12 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
}
|
||||
}
|
||||
|
||||
// Used as key object in map for cryptographic hash of stored data as byte[] as primitive data type cannot be
|
||||
// used as key
|
||||
public static final class ByteArray implements Serializable {
|
||||
|
||||
/**
|
||||
* Used as key object in map for cryptographic hash of stored data as byte[] as primitive data type cannot be
|
||||
* used as key
|
||||
*/
|
||||
public static final class ByteArray implements Persistable {
|
||||
// That object is saved to disc. We need to take care of changes to not break deserialization.
|
||||
private static final long serialVersionUID = Version.LOCAL_DB_VERSION;
|
||||
|
||||
|
|
@ -536,4 +543,46 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Used as value in map
|
||||
*/
|
||||
private static final class MapValue implements Persistable {
|
||||
// That object is saved to disc. We need to take care of changes to not break deserialization.
|
||||
private static final long serialVersionUID = Version.LOCAL_DB_VERSION;
|
||||
|
||||
final public int sequenceNr;
|
||||
final public long timeStamp;
|
||||
|
||||
public MapValue(int sequenceNr, long timeStamp) {
|
||||
this.sequenceNr = sequenceNr;
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MapValue)) return false;
|
||||
|
||||
MapValue mapValue = (MapValue) o;
|
||||
|
||||
if (sequenceNr != mapValue.sequenceNr) return false;
|
||||
return timeStamp == mapValue.timeStamp;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = sequenceNr;
|
||||
result = 31 * result + (int) (timeStamp ^ (timeStamp >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MapValue{" +
|
||||
"sequenceNr=" + sequenceNr +
|
||||
", timeStamp=" + timeStamp +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package io.bitsquare.p2p.storage.messages;
|
||||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
|
||||
/**
|
||||
* Messages which support a time to live
|
||||
|
|
@ -10,7 +10,7 @@ import java.io.Serializable;
|
|||
* @see StoragePayload
|
||||
* @see MailboxPayload
|
||||
*/
|
||||
public interface ExpirablePayload extends Serializable {
|
||||
public interface ExpirablePayload extends Payload {
|
||||
/**
|
||||
* @return Time to live in milli seconds
|
||||
*/
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package io.bitsquare.p2p.storage.messages;
|
||||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.crypto.PrefixedSealedAndSignedMessage;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedData;
|
||||
|
||||
import java.security.PublicKey;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -1,18 +1,17 @@
|
|||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
import io.bitsquare.p2p.storage.P2PDataStorage;
|
||||
import io.bitsquare.p2p.storage.messages.ExpirablePayload;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.security.PublicKey;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
public class ProtectedData implements Serializable {
|
||||
public class ProtectedData implements Payload {
|
||||
private static final Logger log = LoggerFactory.getLogger(P2PDataStorage.class);
|
||||
|
||||
public final ExpirablePayload expirablePayload;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import io.bitsquare.p2p.storage.P2PDataStorage;
|
||||
import io.bitsquare.p2p.storage.messages.MailboxPayload;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package io.bitsquare.p2p.storage.data;
|
|||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.common.crypto.Sig;
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.Serializable;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
|
|
@ -16,7 +16,7 @@ import java.security.spec.InvalidKeySpecException;
|
|||
import java.security.spec.X509EncodedKeySpec;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class RefreshTTLBundle implements Serializable {
|
||||
public class RefreshTTLBundle implements Payload {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
package io.bitsquare.p2p.storage.messages;
|
||||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import io.bitsquare.common.wire.Payload;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Used for messages which require that the data owner is online.
|
||||
* <p>
|
||||
* This is used for the offers to avoid dead offers in case the offerer is in sleep/hibernate mode or the app has
|
||||
* terminated without sending the remove message (e.g. in case of a crash).
|
||||
*/
|
||||
public interface RequiresOwnerIsOnlinePayload extends Serializable {
|
||||
public interface RequiresOwnerIsOnlinePayload extends Payload {
|
||||
/**
|
||||
* @return NodeAddress of the data owner
|
||||
*/
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package io.bitsquare.p2p.storage.messages;
|
||||
package io.bitsquare.p2p.storage.data;
|
||||
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
import io.bitsquare.p2p.storage.data.ProtectedData;
|
||||
|
||||
import java.security.PublicKey;
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ package io.bitsquare.p2p.mocks;
|
|||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.p2p.NodeAddress;
|
||||
import io.bitsquare.p2p.messaging.MailboxMessage;
|
||||
import io.bitsquare.p2p.storage.messages.ExpirablePayload;
|
||||
import io.bitsquare.p2p.storage.data.ExpirablePayload;
|
||||
|
||||
public final class MockMailboxPayload implements MailboxMessage, ExpirablePayload {
|
||||
private final int messageVersion = Version.getP2PMessageVersion();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package io.bitsquare.p2p.mocks;
|
|||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.p2p.Message;
|
||||
import io.bitsquare.p2p.storage.messages.ExpirablePayload;
|
||||
import io.bitsquare.p2p.storage.data.ExpirablePayload;
|
||||
|
||||
public final class MockPayload implements Message, ExpirablePayload {
|
||||
public final String msg;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package io.bitsquare.p2p.storage.mocks;
|
||||
|
||||
import io.bitsquare.p2p.storage.messages.StoragePayload;
|
||||
import io.bitsquare.p2p.storage.data.StoragePayload;
|
||||
|
||||
import java.security.PublicKey;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue