mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-27 17:05:29 -04:00
Add support for btc network version for p2p network messages
This commit is contained in:
parent
7c4bf8680b
commit
09321c89b3
45 changed files with 199 additions and 178 deletions
|
@ -32,7 +32,7 @@ import java.util.Arrays;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class DisputeMailMessage implements DisputeMessage {
|
||||
public class DisputeMailMessage extends DisputeMessage {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.NETWORK_PROTOCOL_VERSION;
|
||||
transient private static final Logger log = LoggerFactory.getLogger(DisputeMailMessage.class);
|
||||
|
|
|
@ -17,7 +17,12 @@
|
|||
|
||||
package io.bitsquare.arbitration.messages;
|
||||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.p2p.messaging.MailboxMessage;
|
||||
|
||||
public interface DisputeMessage extends MailboxMessage {
|
||||
public abstract class DisputeMessage implements MailboxMessage {
|
||||
@Override
|
||||
public int networkId() {
|
||||
return Version.NETWORK_ID;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import io.bitsquare.app.Version;
|
|||
import io.bitsquare.arbitration.DisputeResult;
|
||||
import io.bitsquare.p2p.Address;
|
||||
|
||||
public class DisputeResultMessage implements DisputeMessage {
|
||||
public class DisputeResultMessage extends DisputeMessage {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.NETWORK_PROTOCOL_VERSION;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import io.bitsquare.app.Version;
|
|||
import io.bitsquare.arbitration.Dispute;
|
||||
import io.bitsquare.p2p.Address;
|
||||
|
||||
public class OpenNewDisputeMessage implements DisputeMessage {
|
||||
public class OpenNewDisputeMessage extends DisputeMessage {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.NETWORK_PROTOCOL_VERSION;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import io.bitsquare.app.Version;
|
|||
import io.bitsquare.arbitration.Dispute;
|
||||
import io.bitsquare.p2p.Address;
|
||||
|
||||
public class PeerOpenedDisputeMessage implements DisputeMessage {
|
||||
public class PeerOpenedDisputeMessage extends DisputeMessage {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.NETWORK_PROTOCOL_VERSION;
|
||||
public final Dispute dispute;
|
||||
|
|
|
@ -22,7 +22,7 @@ import io.bitsquare.p2p.Address;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class PeerPublishedPayoutTxMessage implements DisputeMessage {
|
||||
public class PeerPublishedPayoutTxMessage extends DisputeMessage {
|
||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||
private static final long serialVersionUID = Version.NETWORK_PROTOCOL_VERSION;
|
||||
|
||||
|
|
|
@ -32,4 +32,9 @@ public abstract class OfferMessage implements MailMessage {
|
|||
protected OfferMessage(String offerId) {
|
||||
this.offerId = offerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int networkId() {
|
||||
return Version.NETWORK_ID;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,9 @@ public abstract class TradeMessage implements MailMessage {
|
|||
protected TradeMessage(String tradeId) {
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int networkId() {
|
||||
return Version.NETWORK_ID;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue