mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Extract isSuccess(BaseFuture) method into util class
This commit is contained in:
parent
000302d29e
commit
57f2b43845
3 changed files with 33 additions and 12 deletions
|
@ -53,6 +53,8 @@ import net.tomp2p.utils.Utils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static io.bitsquare.network.tomp2p.BaseFutureUtil.isSuccess;
|
||||
|
||||
|
||||
/**
|
||||
* That facade delivers direct messaging and DHT functionality from the TomP2P library
|
||||
|
@ -280,12 +282,6 @@ class TomP2PMessageFacade implements MessageFacade {
|
|||
incomingMessageListeners.remove(listener);
|
||||
}
|
||||
|
||||
// Isolate the success handling as there is bug in port forwarding mode
|
||||
private boolean isSuccess(BaseFuture baseFuture) {
|
||||
// return baseFuture.isSuccess();
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Incoming message handler
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* This file is part of Bitsquare.
|
||||
*
|
||||
* Bitsquare is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bitsquare is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.network.tomp2p;
|
||||
|
||||
import net.tomp2p.futures.BaseFuture;
|
||||
|
||||
public class BaseFutureUtil {
|
||||
|
||||
// Isolate the success handling as there is bug in port forwarding mode
|
||||
public static boolean isSuccess(BaseFuture baseFuture) {
|
||||
// return baseFuture.isSuccess();
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -46,6 +46,8 @@ import net.tomp2p.storage.Data;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static io.bitsquare.network.tomp2p.BaseFutureUtil.isSuccess;
|
||||
|
||||
class TomP2POfferRepository implements OfferRepository {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(TomP2POfferRepository.class);
|
||||
|
@ -289,10 +291,4 @@ class TomP2POfferRepository implements OfferRepository {
|
|||
private Number160 getInvalidatedLocationKey(Number160 locationKey) {
|
||||
return Number160.createHash(locationKey + "invalidated");
|
||||
}
|
||||
|
||||
// Isolate the success handling as there is bug in port forwarding mode
|
||||
private boolean isSuccess(BaseFuture baseFuture) {
|
||||
// return baseFuture.isSuccess();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue