Move btc setup classes to setup package

This commit is contained in:
Manfred Karrer 2018-09-23 14:46:58 -05:00
parent c2df7cec7c
commit f3f719a632
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
43 changed files with 53 additions and 42 deletions

View file

@ -20,9 +20,9 @@ package bisq.core.app;
import bisq.core.arbitration.ArbitratorManager;
import bisq.core.btc.BtcOptionKeys;
import bisq.core.btc.RegTestHost;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.dao.DaoOptionKeys;
import bisq.core.dao.DaoSetup;
import bisq.core.exceptions.BisqException;

View file

@ -26,9 +26,9 @@ import bisq.core.arbitration.DisputeManager;
import bisq.core.btc.AddressEntry;
import bisq.core.btc.BalanceModel;
import bisq.core.btc.listeners.BalanceListener;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.dao.DaoSetup;
import bisq.core.filter.FilterManager;
import bisq.core.locale.Res;
@ -88,8 +88,6 @@ import javafx.collections.SetChangeListener;
import org.spongycastle.crypto.params.KeyParameter;
import java.security.Security;
import java.net.InetSocketAddress;
import java.net.Socket;

View file

@ -17,8 +17,8 @@
package bisq.core.app;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.user.Preferences;
import bisq.core.util.BSFormatter;

View file

@ -21,9 +21,9 @@ import bisq.core.app.AppOptionKeys;
import bisq.core.app.BisqEnvironment;
import bisq.core.app.BisqExecutable;
import bisq.core.arbitration.ArbitratorManager;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.offer.OpenOfferManager;
import bisq.network.p2p.P2PService;

View file

@ -25,11 +25,11 @@ import bisq.core.arbitration.messages.PeerOpenedDisputeMessage;
import bisq.core.arbitration.messages.PeerPublishedDisputePayoutTxMessage;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.TradeWalletService;
import bisq.core.btc.wallet.TxBroadcastException;
import bisq.core.btc.wallet.TxBroadcaster;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.offer.OpenOffer;
import bisq.core.offer.OpenOfferManager;

View file

@ -18,12 +18,12 @@
package bisq.core.btc;
import bisq.core.app.AppOptionKeys;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqCoinSelector;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.NonBsqCoinSelector;
import bisq.core.btc.wallet.TradeWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.provider.PriceNodeHttpClient;
import bisq.core.provider.ProvidersRepository;
import bisq.core.provider.fee.FeeProvider;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import org.bitcoinj.crypto.ChildNumber;
import org.bitcoinj.crypto.DeterministicKey;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import org.bitcoinj.crypto.ChildNumber;
import org.bitcoinj.crypto.DeterministicKey;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.wallet.DeterministicKeyChain;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import org.bitcoinj.crypto.ChildNumber;
import org.bitcoinj.crypto.DeterministicKey;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.core.btc.BitcoinNodes.BtcNode;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.core.btc.BitcoinNodes.BtcNode;

View file

@ -33,7 +33,7 @@
* PircBotX. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc;
package bisq.core.btc.setup;
import javax.net.SocketFactory;

View file

@ -31,7 +31,7 @@
* limitations under the License.
*/
package bisq.core.btc;
package bisq.core.btc.setup;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.net.discovery.PeerDiscovery;

View file

@ -15,10 +15,11 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.ProxySocketFactory;
import bisq.core.btc.wallet.BisqRiskAnalysis;
import bisq.core.btc.wallet.BsqWallet;
import bisq.common.app.Version;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.network.Socks5MultiDiscovery;

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.core.btc.BitcoinNodes;
import bisq.core.btc.BitcoinNodes.BitcoinNodesOption;
@ -32,7 +32,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static bisq.core.btc.BitcoinNodes.BitcoinNodesOption.CUSTOM;
import static bisq.core.btc.wallet.WalletsSetup.DEFAULT_CONNECTIONS;
import static bisq.core.btc.setup.WalletsSetup.DEFAULT_CONNECTIONS;
class WalletSetupPreferences {

View file

@ -15,7 +15,7 @@
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.btc.wallet;
package bisq.core.btc.setup;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.AddressEntry;
@ -341,12 +341,12 @@ public class WalletsSetup {
// Backup
///////////////////////////////////////////////////////////////////////////////////////////
void backupWallets() {
public void backupWallets() {
FileUtil.rollingBackup(walletDir, btcWalletFileName, 20);
FileUtil.rollingBackup(walletDir, BSQ_WALLET_FILE_NAME, 20);
}
void clearBackups() {
public void clearBackups() {
try {
FileUtil.deleteDirectory(new File(Paths.get(walletDir.getAbsolutePath(), "backup").toString()));
} catch (IOException e) {

View file

@ -21,6 +21,7 @@ import bisq.core.app.BisqEnvironment;
import bisq.core.btc.Restrictions;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.dao.state.BsqStateListener;
import bisq.core.dao.state.BsqStateService;
import bisq.core.dao.state.blockchain.Block;

View file

@ -24,6 +24,7 @@ import bisq.core.btc.InsufficientFundsException;
import bisq.core.btc.Restrictions;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.provider.fee.FeeService;
import bisq.core.user.Preferences;

View file

@ -25,6 +25,8 @@ import bisq.core.btc.data.RawTransactionInput;
import bisq.core.btc.exceptions.SigningException;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.setup.WalletConfig;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.locale.Res;
import bisq.common.app.Log;

View file

@ -23,6 +23,7 @@ import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.listeners.AddressConfidenceListener;
import bisq.core.btc.listeners.BalanceListener;
import bisq.core.btc.listeners.TxConfidenceListener;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.provider.fee.FeeService;
import bisq.core.user.Preferences;

View file

@ -18,7 +18,8 @@
package bisq.core.btc.wallet;
import bisq.core.btc.BitcoinNodes.BtcNode;
import bisq.core.btc.wallet.BtcNodeConverter.Facade;
import bisq.core.btc.setup.BtcNodeConverter;
import bisq.core.btc.setup.BtcNodeConverter.Facade;
import bisq.network.DnsLookupException;

View file

@ -18,6 +18,8 @@
package bisq.core.btc.wallet;
import bisq.core.btc.BitcoinNodes.BtcNode;
import bisq.core.btc.setup.BtcNodeConverter;
import bisq.core.btc.setup.PeerAddressesRepository;
import org.bitcoinj.core.PeerAddress;

View file

@ -17,6 +17,9 @@
package bisq.core.btc.wallet;
import bisq.core.btc.setup.WalletConfig;
import bisq.core.btc.setup.WalletNetworkConfig;
import bisq.network.Socks5MultiDiscovery;
import org.bitcoinj.core.NetworkParameters;

View file

@ -19,6 +19,7 @@ package bisq.core.btc.wallet;
import bisq.core.btc.BitcoinNodes;
import bisq.core.btc.BitcoinNodes.BtcNode;
import bisq.core.btc.setup.WalletSetupPreferences;
import bisq.core.user.Preferences;
import java.util.List;

View file

@ -33,8 +33,8 @@ import bisq.core.alert.PrivateNotificationManager;
import bisq.core.app.AppOptionKeys;
import bisq.core.app.BisqEnvironment;
import bisq.core.app.BisqSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.payment.AccountAgeWitnessService;

View file

@ -24,7 +24,7 @@ import bisq.desktop.main.funds.deposit.DepositView;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.GUIUtil;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.dao.DaoFacade;
import bisq.core.dao.bonding.lockup.LockupType;
import bisq.core.dao.governance.role.BondedRole;

View file

@ -27,9 +27,9 @@ import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.InsufficientBsqException;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.dao.DaoFacade;
import bisq.core.dao.exceptions.ValidationException;
import bisq.core.dao.governance.proposal.Proposal;

View file

@ -34,6 +34,7 @@ import bisq.desktop.util.validation.BsqValidator;
import bisq.desktop.util.validation.BtcValidator;
import bisq.core.btc.Restrictions;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqBalanceListener;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
@ -41,7 +42,6 @@ import bisq.core.btc.wallet.TxBroadcastException;
import bisq.core.btc.wallet.TxBroadcaster;
import bisq.core.btc.wallet.TxMalleabilityException;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.util.BSFormatter;
import bisq.core.util.BsqFormatter;

View file

@ -28,8 +28,8 @@ import bisq.desktop.main.overlays.windows.OfferDetailsWindow;
import bisq.desktop.main.overlays.windows.TradeDetailsWindow;
import bisq.desktop.util.GUIUtil;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.offer.OpenOffer;
import bisq.core.trade.Tradable;

View file

@ -31,8 +31,8 @@ import bisq.core.btc.AddressEntryException;
import bisq.core.btc.InsufficientFundsException;
import bisq.core.btc.Restrictions;
import bisq.core.btc.listeners.BalanceListener;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.trade.Tradable;
import bisq.core.trade.Trade;

View file

@ -36,7 +36,7 @@ import bisq.desktop.util.validation.SecurityDepositValidator;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.Restrictions;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;

View file

@ -27,7 +27,7 @@ import bisq.desktop.util.validation.FiatPriceValidator;
import bisq.desktop.util.validation.FiatVolumeValidator;
import bisq.desktop.util.validation.SecurityDepositValidator;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.util.BSFormatter;

View file

@ -27,7 +27,7 @@ import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.validation.BtcValidator;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.monetary.Price;

View file

@ -25,10 +25,10 @@ import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Transitions;
import bisq.core.btc.Restrictions;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.offer.OpenOfferManager;
import bisq.core.util.BSFormatter;

View file

@ -24,10 +24,10 @@ import bisq.desktop.util.GUIUtil;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.WalletException;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.TradeWalletService;
import bisq.core.btc.wallet.TxBroadcastException;
import bisq.core.btc.wallet.TxBroadcaster;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.network.p2p.P2PService;

View file

@ -26,7 +26,7 @@ import bisq.desktop.util.validation.FiatPriceValidator;
import bisq.desktop.util.validation.FiatVolumeValidator;
import bisq.desktop.util.validation.SecurityDepositValidator;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.offer.OpenOffer;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;

View file

@ -30,8 +30,8 @@ import bisq.desktop.util.GUIUtil;
import bisq.core.arbitration.Dispute;
import bisq.core.arbitration.DisputeAlreadyOpenException;
import bisq.core.arbitration.DisputeManager;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Res;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;

View file

@ -30,7 +30,7 @@ import bisq.desktop.util.GUIUtil;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.BitcoinNodes;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.filter.Filter;
import bisq.core.filter.FilterManager;
import bisq.core.locale.Res;

View file

@ -22,8 +22,8 @@ import bisq.desktop.components.indicator.TxConfidenceIndicator;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
import bisq.core.locale.CurrencyUtil;

View file

@ -21,7 +21,7 @@ import bisq.monitor.metrics.p2p.MonitorP2PService;
import bisq.core.app.BisqEnvironment;
import bisq.core.app.SetupUtils;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.network.crypto.EncryptionService;
import bisq.network.p2p.network.SetupListener;

View file

@ -20,7 +20,7 @@ package bisq.monitor.metrics;
import bisq.monitor.MonitorOptionKeys;
import bisq.core.btc.BitcoinNodes;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.btc.setup.WalletsSetup;
import bisq.core.locale.Res;
import bisq.network.p2p.NodeAddress;