Refactor:

- Rename XmrTransferProofRequest to XmrTxProofRequest
This commit is contained in:
chimp1984 2020-08-30 19:37:43 -05:00
parent a758880211
commit 0e2268d6fe
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
2 changed files with 8 additions and 8 deletions

View file

@ -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();

View file

@ -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.*")) {