mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
A decentralized bitcoin exchange network
f895da416f
Refactors LocalBitcoinNode and adds detection for local Bitcoin node's configuration, namely, whether it is pruning and whether it has bloom filter queries enabled. The local node's configuration (and its presence) is retrieved by performing a Bitcoin protocol handshake, which includes the local Bitcoin node sending us its version message (VersionMessage in BitcoinJ), which contains the information we're interested in. Due to some quirky BitcoinJ logic, sometimes the handshake is interrupted, even though we have received the local node's version message. That contributes to the handshake handling in LocalBitcoinNode being a bit complicated. Refactoring consists of two principle changes: the public interface is split into methods that trigger checks and methods that retrieve the cached results. The methods that trigger checks have names starting with "check", and methods that retrieve the cached results have names that start with "is". The other major refactor is the use of Optional<Boolean> instead of boolean for storing and returning the results, an empty Optional signifying that the relevant check was not yet performed. Switching to Optionals has caused other code that queries LocalBitcoinNode to throw an exception in case the query is made before the checks are. Before, the results were instantiated to "false" and that would be returned in case the query was made before the checks completed. This change has revealed one occasion (Preferences class) where this happens. |
||
---|---|---|
.github | ||
.idea | ||
assets/src | ||
cli/src/main/java/bisq/cli/app | ||
common/src | ||
core | ||
daemon/src/main/java | ||
desktop | ||
docs | ||
gradle | ||
monitor | ||
p2p/src | ||
pricenode | ||
relay | ||
scripts | ||
seednode | ||
statsnode/src/main | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
build.gradle | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
Makefile | ||
pull_request_template.md | ||
README.md | ||
settings.gradle |
Bisq
What is Bisq?
Bisq is a safe, private and decentralized way to exchange bitcoin for national currencies and other digital assets. Bisq uses peer-to-peer networking and multi-signature escrow to facilitate trading without a third party. Bisq is non-custodial and incorporates a human arbitration system to resolve disputes.
To learn more, see the doc and video at https://bisq.network/intro.
Get started using Bisq
Follow the step-by-step instructions at https://bisq.network/get-started.
Contribute to Bisq
See CONTRIBUTING.md and the developer docs.