mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Add getDateAsLong method, add setter for capabilities
This commit is contained in:
parent
186a9d670d
commit
7af16d7af3
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,8 @@ public final class Peer implements HasCapabilities, NetworkPayload, PersistableP
|
||||||
private final long date;
|
private final long date;
|
||||||
@Setter
|
@Setter
|
||||||
transient private int failedConnectionAttempts = 0;
|
transient private int failedConnectionAttempts = 0;
|
||||||
private final Capabilities capabilities = new Capabilities();
|
@Setter
|
||||||
|
private Capabilities capabilities = new Capabilities();
|
||||||
|
|
||||||
public Peer(NodeAddress nodeAddress, @Nullable Capabilities supportedCapabilities) {
|
public Peer(NodeAddress nodeAddress, @Nullable Capabilities supportedCapabilities) {
|
||||||
this(nodeAddress, new Date().getTime(), supportedCapabilities);
|
this(nodeAddress, new Date().getTime(), supportedCapabilities);
|
||||||
|
@ -91,6 +92,10 @@ public final class Peer implements HasCapabilities, NetworkPayload, PersistableP
|
||||||
return new Date(date);
|
return new Date(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getDateAsLong() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(Capabilities supportedCapabilities) {
|
public void onChanged(Capabilities supportedCapabilities) {
|
||||||
if (!supportedCapabilities.isEmpty()) {
|
if (!supportedCapabilities.isEmpty()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue