Commit Graph

3839 Commits

Author SHA1 Message Date
Dominykas Mostauskis
2105b219c9
Changes to local BTC node info in Settings 2020-03-03 18:50:44 +01:00
Christoph Atteneder
fa56b91f6d
Revert "Vote Reveal - Silent Fail" 2020-02-28 16:01:03 +01:00
sqrrm
1d1cba1e4d
Merge pull request #3982 from dmos62/local-btc-node-configuration-check
Add local Bitcoin node configuration detection
2020-02-27 15:29:49 +01:00
Dominykas Mostauskis
85e4515f53
Remove reference to removed constant 2020-02-27 12:14:32 +01:00
Chris Beams
57b7041dfe
Remove unnecessary LOCAL_BITCOIN_NODE_PORT constant
This was originally added with the intention that the local Bitcoin node
port could be customized, but in fact it never could be, because Guice
configuration always hard-wired the value to the default port for the
CurrentBaseNetwork's Parameters (eg. 8333 for BTC_MAINNET).

This change removes the constant, removes any Guice wiring and injection
and localizes the hard-coded assignment to the LocalBitcoinNode
constructor to simplify and make things explicit.

If it is desired to allow users to specify a custom port for their local
Bitcoin node, a proper option shoud be added to Config. In the meantime,
users may work around this by using `--btcNodes=localhost:4242` where
4242 is the custom port. Note however, that the pruning and bloom filter
checks will not occur in this case as the provided node address will not
being treated as a LocalBitcoinNode.
2020-02-27 09:53:40 +01:00
Chris Beams
c1a99ccc55
Polish LocalBitcoinNode method names and visibility
- Rename #willUse => #shouldBeUsed
 - Rename #willIgnore => #shouldBeIgnored
 - Reduce visibility of methods where appropriate
 - Edit Javadoc typos and use @link syntax where appropriate
2020-02-27 09:35:36 +01:00
Chris Beams
b93ca2b2b1
Polish formatting 2020-02-26 21:24:38 +01:00
Dominykas Mostauskis
fdaced460f
Changes to Background information popup 2020-02-26 17:20:55 +01:00
Dominykas Mostauskis
30578bfa9d
Have detection work on other network modes
This makes detection work on other BTC network modes, not only mainnet.
2020-02-26 17:09:01 +01:00
Dominykas Mostauskis
a92b6ad9dc
Minor requested changes (non-github batch) 2020-02-26 14:34:08 +01:00
dmos62
6dec780ab4
Minor requested changes (github batch)
Co-Authored-By: Christoph Atteneder <christoph.atteneder@gmail.com>
2020-02-26 14:21:03 +01:00
Stephan Oeste
d5bb9c4425
Moved one btc node to new host
Moved node2.emzy.de to a new host.
IP address updated.
2020-02-26 13:26:45 +01:00
Christoph Atteneder
a6d874c3c1
Merge pull request #3758 from bisq-3408/master
Vote Reveal - Silent Fail
2020-02-26 12:53:03 +01:00
Dominykas Mostauskis
2a57ecddfc
Fix failing test 2020-02-25 16:22:51 +01:00
Dominykas Mostauskis
6b4878ada8
Centralize some of local BTC node logic
Introduces LocalBitcoinNode::willUse and ::willIgnore to move logic that
was previously littered throughout the codebase into one place. Also,
changes the usages of LocalBitcoinNode to be more precise, specifying
which of these questions are being asked:

- "is there a local BTC node" (isDetected);
- "is it well configured" (isWellConfigured and isUsable);
- "will we ignore a local BTC node even if we found a usable one"
  (willIgnore);
- "is there a usable local BTC node and will we use it" (willUse).

These changes make related logic much easier to maintain and to read.
2020-02-25 15:56:02 +01:00
Dominykas Mostauskis
aceb608e3a
Reorder methods 2020-02-25 14:18:36 +01:00
Dominykas Mostauskis
0bbbe8c1e9
Perform checks automatically on first query
It's quite amazing how obvious this was, yet I missed it for such a long
time. Simplifies usage of LocalBitcoinNode and its internals even more
so. Fixes #4005. The way we structured LocalBitcoinNode was as if the
detection checks were expensive, but they're not. Previously, in some
cases we would notice that a local BTC node wouldn't be used even if it
was detected, so we would skip these checks. This optimization now
doesn't happen. It might be reimplemented in a coming change where more
local BTC node logic is moved into LocalBitcoinNode, but, even if it's
not, this check is fairly cheap. A notable exception is if the local BTC
node is not responding, which would cause us to wait for a timeout, but
if that is the case the mentioned optimization wouldn't help (most of
the time).
2020-02-25 14:04:34 +01:00
Christoph Atteneder
6537e13371
Add ARS as supported currency for MoneyGram
Fixes #4000.
2020-02-25 10:07:46 +01:00
Dominykas Mostauskis
7848836adc
Formating changes 2020-02-22 01:30:09 +02:00
Dominykas Mostauskis
08cd31b242
Silence NioClient and NioClientManager loggers 2020-02-21 23:53:02 +02:00
Dominykas Mostauskis
65177fcc4c
Fix unchecked usage of LocalBitcoinNode.isUsable() 2020-02-21 23:52:36 +02:00
dmos62
e6dea3d3ed
Improve marking that method is empty
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-02-18 17:30:02 +02:00
Dominykas Mostauskis
daa1b0b20b
Minor changes to satisfy Codacy or clarify why it fails 2020-02-18 13:02:39 +02:00
Dominykas Mostauskis
74c946a28b
Remove defunct test suite
The workings of LocalBitcoinNode significantly changed, especially how
detection works. Before, we were only checking if a port was open, but
now we're actually performing a Bitcoin protocol handshake, which is
difficult to stub. For these reasons the old tests are irrelevant and
replacement tests were not written.
2020-02-18 12:31:15 +02:00
dmos62
18478d9b0d
Downgrade Optional usage to Java 10
I was erroniously targeting Java 11, when Travis requires Java 10. `Optional.isEmpty` shows up only in Java 11.
2020-02-18 12:21:17 +02:00
Dominykas Mostauskis
f895da416f
Add local Bitcoin node configuration detection
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.
2020-02-18 00:34:58 +02:00
sqrrm
0cf7169587
Allow 4 refreshes per trade 2020-02-17 17:50:19 +01:00
sqrrm
23c2052fe6
Merge pull request #3970 from bisq-network/release/v1.2.6
Release/v1.2.6
2020-02-17 13:04:32 +01:00
Christoph Atteneder
f53a41ee7a
Allow NullpointerException to be thrown for invalid offers
It is handled properly and will remove offers from being exported
2020-02-12 18:05:28 +01:00
Christoph Atteneder
33ce412548
Update bitcoinJ checkpoints file 2020-02-12 09:34:20 +01:00
Christoph Atteneder
b00d73ff7c
Add test for Liquid Bitcoin and improve error handling 2020-02-11 17:31:43 +01:00
Christoph Atteneder
7f93ce7e31
Remove empty line
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-02-11 12:22:58 +01:00
Christoph Atteneder
4f9d0fa36c
Remove duplicates when delivered from storage 2020-02-11 12:22:36 +01:00
Christoph Atteneder
2e5184f50d
Revert setting of deposit tx id to null 2020-02-11 12:22:28 +01:00
Christoph Atteneder
0157ed137e
Update bitcoinJ checkpoints file 2020-02-11 11:59:28 +01:00
wiz
22e8c242dc
Add 2 new btcnodes operated by @wiz
* m3yqzythryowgedc.onion:8333
* zyhtr2ffbzn5yeg3.onion:8333
2020-02-11 11:34:44 +01:00
Christoph Atteneder
bb0c14dae4
Merge pull request #3954 from wiz/add-moar-wiz-btcnodes
Add 2 new btcnodes operated by @wiz
2020-02-11 11:34:27 +01:00
Christoph Atteneder
fe1aa465cb
Update translations 2020-02-11 11:14:14 +01:00
Christoph Atteneder
f516da6810
Remove empty line
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-02-10 13:49:54 +01:00
Christoph Atteneder
447c7e8fa4
Remove duplicates when delivered from storage 2020-02-10 13:15:56 +01:00
Christoph Atteneder
834e00fbb9
Revert setting of deposit tx id to null 2020-02-10 13:15:12 +01:00
wiz
bb920319ff
Add 2 new btcnodes operated by @wiz
* m3yqzythryowgedc.onion:8333
* zyhtr2ffbzn5yeg3.onion:8333
2020-02-09 17:27:22 +09:00
sqrrm
fab37f9f01
Fix codacy comment 2020-02-07 15:58:53 +01:00
sqrrm
bc654f439c
Add signing debug logs
Fix warning about possible nullpointer exceptions. Better to have an
explicit check for debug purposes.

Smaller cleanups
2020-02-07 15:58:45 +01:00
sqrrm
ac7d636402
Add signing debug logs (#3948)
* Add signing debug logs

Fix warning about possible nullpointer exceptions. Better to have an
explicit check for debug purposes.

Smaller cleanups

* Fix codacy comment
2020-02-07 15:57:25 +01:00
Niyi Dada
4020b85f66
Added interface and corresponding implementation to handle display of
exceptions on failed vote reveal transaction - fixes issue 3408. Allow
"do not show again".
2020-02-07 07:00:39 +01:00
Steve Jain
85f1a1d9b6
Fix dao bond table column label 2020-02-06 13:13:30 -05:00
sqrrm
d88a8ac8f0
Merge pull request #3939 from ripcurlx/improve-local-node-info
Add additional information for a local Bitcoin Core v0.19+
2020-02-05 23:41:33 +01:00
Christoph Atteneder
ba12943920
Make sure that class is only instantiated once
This fixes an error when running a local Bitcoin Core for Mainnet
caused by a duplicate wallet setup
2020-02-05 16:56:59 +01:00
Christoph Atteneder
040b8d53de
Improve wording
Co-Authored-By: wiz <j@wiz.biz>
2020-02-05 12:03:28 +01:00