Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use btcNodes argument in regtest mode. #1416

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core/src/main/java/io/bisq/core/btc/wallet/WalletsSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected void onSetupCompleted() {
};

if (params == RegTestParams.get()) {
configPeerNodesForRegTest();
configPeerNodesForRegTest(socks5Proxy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to have additional checks here and not call configPeerNodes(proxy); from configPeerNodesForRegTest. What is the usecase that you need?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When each node runs in separate docker container they have different IPs and are not reachable by localhost. Regtest mode currently forces to use specific bitcoin node IP or tries to use localhost.
I need ability to point bisq to specific IP in regtest mode.

} else if (bisqEnvironment.isBitcoinLocalhostNodeRunning()) {
configPeerNodesForLocalHostBitcoinNode();
} else {
Expand Down Expand Up @@ -268,7 +268,7 @@ private int evaluateMode(String socks5DiscoverModeString) {
return mode;
}

private void configPeerNodesForRegTest() {
private void configPeerNodesForRegTest(@Nullable Socks5Proxy proxy) {
walletConfig.setMinBroadcastConnections(1);
if (regTestHost == RegTestHost.REG_TEST_SERVER) {
try {
Expand All @@ -280,6 +280,8 @@ private void configPeerNodesForRegTest() {
}
} else if (regTestHost == RegTestHost.LOCALHOST) {
walletConfig.setPeerNodesForLocalHost();
} else {
configPeerNodes(proxy);
}
}

Expand Down