[bisq-network/bisq] Not allow bitcoinj to auto connect to localhost when localhost was not detected by client (#3783)

Christoph Atteneder notifications at github.com
Thu Dec 12 16:35:13 UTC 2019


This fixes the problem if the local bitcoin core node is not detected by our client,
but bitcoinj is able to connect to it because of the auto connect to localhost behavior.
In that case the minimum required nodes to broadcast a transaction will be 4 (provided nodes settings),
but bitcoinj will only connect to one node. The requirement of 4 nodes will be never fulfilled and
the transaction never broadcasted.

### Testinig
As this is a bug based on the default localhost connect behavior of bitcoinj it is difficult to simulate on regtest.
To simulate this behavior on mainnet you could try following steps:
- Use current master
- Skip the initial check for a localhost node in BisqSetup `step 3`
- Go to network settings and you'll see only one node is connected but the minimum peers for broadcast is still set to `4`
- Checkout this PR and skip the initial check for localhost again
- Go to network settings and you'll see that the client connects to the provided nodes and will be able to broadcast transactions
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/3783

-- Commit Summary --

  * Not allow bitcoinj to auto connect to localhost when localhost was not detected by client

-- File Changes --

    M core/src/main/java/bisq/core/btc/setup/WalletConfig.java (6)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/3783.patch
https://github.com/bisq-network/bisq/pull/3783.diff

-- 
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/3783
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191212/3c7fb749/attachment.html>


More information about the bisq-github mailing list