-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add local Bitcoin node configuration detection #3982
Merged
sqrrm
merged 20 commits into
bisq-network:master
from
dmos62:local-btc-node-configuration-check
Feb 27, 2020
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f895da4
Add local Bitcoin node configuration detection
dmos62 18478d9
Downgrade Optional usage to Java 10
dmos62 74c946a
Remove defunct test suite
dmos62 daa1b0b
Minor changes to satisfy Codacy or clarify why it fails
dmos62 e6dea3d
Improve marking that method is empty
dmos62 65177fc
Fix unchecked usage of LocalBitcoinNode.isUsable()
dmos62 08cd31b
Silence NioClient and NioClientManager loggers
dmos62 7848836
Formating changes
dmos62 0bbbe8c
Perform checks automatically on first query
dmos62 aceb608
Reorder methods
dmos62 6b4878a
Centralize some of local BTC node logic
dmos62 2a57ecd
Fix failing test
dmos62 6dec780
Minor requested changes (github batch)
dmos62 a92b6ad
Minor requested changes (non-github batch)
dmos62 30578bf
Have detection work on other network modes
dmos62 fdaced4
Changes to Background information popup
dmos62 b93ca2b
Polish formatting
cbeams c1a99cc
Polish LocalBitcoinNode method names and visibility
cbeams 57b7041
Remove unnecessary LOCAL_BITCOIN_NODE_PORT constant
cbeams 85e4515
Remove reference to removed constant
dmos62 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,6 @@ | |
import java.io.File; | ||
|
||
import static bisq.common.config.Config.*; | ||
import static bisq.core.btc.nodes.LocalBitcoinNode.LOCAL_BITCOIN_NODE_PORT; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, thanks @dmos62. |
||
import static com.google.inject.name.Names.named; | ||
|
||
public class ModuleForAppWithP2p extends AppModule { | ||
|
@@ -82,9 +81,6 @@ protected void configure() { | |
bindConstant().annotatedWith(named(USE_DEV_MODE)).to(config.useDevMode); | ||
bindConstant().annotatedWith(named(REFERRAL_ID)).to(config.referralId); | ||
|
||
bindConstant().annotatedWith(named(LOCAL_BITCOIN_NODE_PORT)) | ||
.to(config.baseCurrencyNetworkParameters.getPort()); | ||
|
||
// ordering is used for shut down sequence | ||
install(new TradeModule(config)); | ||
install(new EncryptionServiceModule(config)); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed redundant
LocalBitcoinNode
call, becausePreferences.getUseTorForBitcoinJ
makes the same call and it has the same effect.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
localBitcoinNode.willUse() == true
andconfig.useTorForBtcOptionSetExplicitly == true
the new code will behave differently than before. So I don't think we should remove this from here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I missed that. Thanks! My concern here is that this line decides whether to "initiate wallet" at this time, which implies that Tor will not be used. Ideally
Preferences.getUseTorForBitcoinJ()
would be a full authority on whether or not we're using Tor, but here it's only one half of the condition. So I can restore initial logic, but ideally I'd like to restructure this. I'll see what I can do.