mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Refactor:
- Rename XmrTransferProofRequester to XmrTransferProofRequest
This commit is contained in:
parent
6f56f90a66
commit
40a7320f32
@ -37,7 +37,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@Slf4j
|
||||
class XmrTransferProofRequester {
|
||||
class XmrTransferProofRequest {
|
||||
// these settings are not likely to change and therefore not put into Config
|
||||
private static final long REPEAT_REQUEST_PERIOD = TimeUnit.SECONDS.toMillis(90);
|
||||
private static final long MAX_REQUEST_PERIOD = TimeUnit.HOURS.toMillis(12);
|
||||
@ -57,10 +57,10 @@ class XmrTransferProofRequester {
|
||||
// Constructor
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XmrTransferProofRequester(Socks5ProxyProvider socks5ProxyProvider,
|
||||
XmrProofInfo xmrProofInfo,
|
||||
Consumer<XmrAutoConfirmResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
XmrTransferProofRequest(Socks5ProxyProvider socks5ProxyProvider,
|
||||
XmrProofInfo xmrProofInfo,
|
||||
Consumer<XmrAutoConfirmResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
this.httpClient = new XmrTxProofHttpClient(socks5ProxyProvider);
|
||||
this.httpClient.setBaseUrl("http://" + xmrProofInfo.getServiceAddress());
|
||||
if (xmrProofInfo.getServiceAddress().matches("^192.*|^localhost.*")) {
|
@ -34,7 +34,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
*/
|
||||
@Slf4j
|
||||
class XmrTransferProofService {
|
||||
private final Map<String, XmrTransferProofRequester> map = new HashMap<>();
|
||||
private final Map<String, XmrTransferProofRequest> map = new HashMap<>();
|
||||
private final Socks5ProxyProvider socks5ProxyProvider;
|
||||
|
||||
@Inject
|
||||
@ -52,7 +52,7 @@ class XmrTransferProofService {
|
||||
}
|
||||
log.info("requesting tx proof with uid {}", uid);
|
||||
|
||||
XmrTransferProofRequester requester = new XmrTransferProofRequester(
|
||||
XmrTransferProofRequest requester = new XmrTransferProofRequest(
|
||||
socks5ProxyProvider,
|
||||
xmrProofInfo,
|
||||
result -> {
|
||||
@ -71,7 +71,7 @@ class XmrTransferProofService {
|
||||
|
||||
void terminateRequest(XmrProofInfo xmrProofInfo) {
|
||||
String uid = xmrProofInfo.getUID();
|
||||
XmrTransferProofRequester requester = map.getOrDefault(uid, null);
|
||||
XmrTransferProofRequest requester = map.getOrDefault(uid, null);
|
||||
if (requester != null) {
|
||||
log.info("Terminating API request for request with uid {}", uid);
|
||||
requester.stop();
|
||||
|
Loading…
Reference in New Issue
Block a user