[bisq-network/bisq] Add local Bitcoin node configuration detection (#3982)
sqrrm
notifications at github.com
Sat Feb 22 17:21:47 UTC 2020
sqrrm approved this pull request.
utACK
I will test this before merging. @dmos62 if you feel like removing some of the extra empty lines in some of the methods meanwhile, please don't hesitate. I find the code harder to read with too much space as it breaks the flow compared with the other parts of the project.
> +
+ /**
+ * Method backported from upstream bitcoinj: at the time of writing, our version is
+ * not BIP111-aware.
+ * Source routines and data can be found in Bitcoinj under:
+ * core/src/main/java/org/bitcoinj/core/VersionMessage.java
+ * and
+ * core/src/main/java/org/bitcoinj/core/NetworkParameters.java
+ */
+
+ private static boolean isBloomFilteringSupportedAndEnabled(VersionMessage versionMessage) {
+ // A service bit that denotes whether the peer supports BIP37 bloom filters or not.
+ // The service bit is defined in BIP111.
+ int NODE_BLOOM = 1 << 2;
+
+ int BLOOM_FILTERS_BIP37_PROTOCOL_VERSION = 70000;
In my opinion this kind of containment is good. Camel case local variables would not be appropriate, but making them local seems right considering the situation.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3982#pullrequestreview-363040004
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200222/20f1e12e/attachment.html>
More information about the bisq-github
mailing list