mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Refactor:
- Rename XmrTransferProofRequest to XmrTxProofRequest
This commit is contained in:
parent
a758880211
commit
0e2268d6fe
2 changed files with 8 additions and 8 deletions
|
@ -34,7 +34,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
*/
|
||||
@Slf4j
|
||||
class XmrTransferProofService {
|
||||
private final Map<String, XmrTransferProofRequest> map = new HashMap<>();
|
||||
private final Map<String, XmrTxProofRequest> map = new HashMap<>();
|
||||
private final Socks5ProxyProvider socks5ProxyProvider;
|
||||
|
||||
@Inject
|
||||
|
@ -52,7 +52,7 @@ class XmrTransferProofService {
|
|||
}
|
||||
log.info("requesting tx proof with uid {}", uid);
|
||||
|
||||
XmrTransferProofRequest requester = new XmrTransferProofRequest(
|
||||
XmrTxProofRequest requester = new XmrTxProofRequest(
|
||||
socks5ProxyProvider,
|
||||
xmrTxProofModel,
|
||||
result -> {
|
||||
|
@ -71,7 +71,7 @@ class XmrTransferProofService {
|
|||
|
||||
void terminateRequest(XmrTxProofModel xmrTxProofModel) {
|
||||
String uid = xmrTxProofModel.getUID();
|
||||
XmrTransferProofRequest requester = map.getOrDefault(uid, null);
|
||||
XmrTxProofRequest requester = map.getOrDefault(uid, null);
|
||||
if (requester != null) {
|
||||
log.info("Terminating API request for request with uid {}", uid);
|
||||
requester.stop();
|
||||
|
|
|
@ -37,7 +37,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@Slf4j
|
||||
class XmrTransferProofRequest {
|
||||
class XmrTxProofRequest {
|
||||
// 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 XmrTransferProofRequest {
|
|||
// Constructor
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XmrTransferProofRequest(Socks5ProxyProvider socks5ProxyProvider,
|
||||
XmrTxProofModel xmrTxProofModel,
|
||||
Consumer<XmrTxProofResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
XmrTxProofRequest(Socks5ProxyProvider socks5ProxyProvider,
|
||||
XmrTxProofModel xmrTxProofModel,
|
||||
Consumer<XmrTxProofResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
this.httpClient = new XmrTxProofHttpClient(socks5ProxyProvider);
|
||||
this.httpClient.setBaseUrl("http://" + xmrTxProofModel.getServiceAddress());
|
||||
if (xmrTxProofModel.getServiceAddress().matches("^192.*|^localhost.*")) {
|
Loading…
Add table
Reference in a new issue