mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
increase offer reliability with TTL, refresh period, max attempts
This commit is contained in:
parent
0d33959eeb
commit
3de4264c4b
@ -55,7 +55,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Getter
|
||||
@Slf4j
|
||||
public final class OfferPayload implements ProtectedStoragePayload, ExpirablePayload, RequiresOwnerIsOnlinePayload {
|
||||
public static final long TTL = TimeUnit.MINUTES.toMillis(9);
|
||||
public static final long TTL = TimeUnit.MINUTES.toMillis(11);
|
||||
|
||||
protected final String id;
|
||||
protected final long date;
|
||||
|
@ -112,8 +112,8 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
private static final String THREAD_ID = OpenOfferManager.class.getSimpleName();
|
||||
private static final long RETRY_REPUBLISH_DELAY_SEC = 10;
|
||||
private static final long REPUBLISH_AGAIN_AT_STARTUP_DELAY_SEC = 30;
|
||||
private static final long REPUBLISH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(40);
|
||||
private static final long REFRESH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(6);
|
||||
private static final long REPUBLISH_INTERVAL_MS = TimeUnit.MINUTES.toMillis(30);
|
||||
private static final long REFRESH_INTERVAL_MS = OfferPayload.TTL / 2;
|
||||
|
||||
private final CoreContext coreContext;
|
||||
private final KeyRing keyRing;
|
||||
|
@ -33,7 +33,7 @@ import java.util.Date;
|
||||
@Getter
|
||||
@Slf4j
|
||||
public final class Peer implements HasCapabilities, NetworkPayload, PersistablePayload, SupportedCapabilitiesListener {
|
||||
private static final int MAX_FAILED_CONNECTION_ATTEMPTS = 5;
|
||||
private static final int MAX_FAILED_CONNECTION_ATTEMPTS = 6;
|
||||
|
||||
private final NodeAddress nodeAddress;
|
||||
private final long date;
|
||||
|
Loading…
Reference in New Issue
Block a user