Skip to content

Commit

Permalink
Add comments, revert TTL change at AckMessage as it has no effect anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
chimp1984 committed Nov 4, 2020
1 parent fe3671a commit fec8f6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p2p/src/main/java/bisq/network/p2p/AckMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

import javax.annotation.Nullable;

// TODO ExpirablePayload has no effect here as it is either a direct msg or packed into MailboxStoragePayload
// We could extend the TTL by setting the TTL in MailboxStoragePayload from the type of msg which gets into the
// SealedAndSigned data.

// We exclude uid from hashcode and equals to detect duplicate entries of the same AckMessage
@EqualsAndHashCode(callSuper = true, exclude = {"uid"})
@Value
Expand Down Expand Up @@ -145,9 +149,10 @@ public static AckMessage fromProto(protobuf.AckMessage proto, int messageVersion
// API
///////////////////////////////////////////////////////////////////////////////////////////

//TODO has no effect, see comment at class definition
@Override
public long getTTL() {
return TimeUnit.DAYS.toMillis(2);
return TimeUnit.DAYS.toMillis(10);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* That is the typical requirement for a mailbox like system.
* <p/>
* Typical payloads are trade or dispute network_messages to be stored when the peer is offline.
* Size depends on payload but typical size is 2000-3000 bytes
*/
@Getter
@EqualsAndHashCode
Expand Down

0 comments on commit fec8f6e

Please sign in to comment.