<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #4057.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="580325699" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4057" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/4057/hovercard" href="https://github.com/bisq-network/bisq/issues/4057">#4057</a></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/wiz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wiz">@wiz</a> discovered (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="580325699" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4057" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/4057/hovercard" href="https://github.com/bisq-network/bisq/issues/4057">#4057</a>) than in some cases LocalBitcoinNode will hang during Bisq setup. This patch gives LocalBitcoinNode's handshake attempt a timeout. Specifically, the part where we block while waiting for BitcoinJ to attempt to return a local BTC node's VersionMessage. I had not originally implemented a timeout, because I was under the impression that in such a case the NioClient would timeout (which does have a timeout).</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/wiz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wiz">@wiz</a> has tested this patch and verified that this is the cause and that with this patch Bisq handles BitcoinJ hanging gracefully (by timing out the relevant future after 5000 ms).</p>
<p>This patch also prints an error in case a timeout happens, because it normally shouldn't.</p>
<p>The underlying cause is unknown, but seems to come from BitcoinJ.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4058'>https://github.com/bisq-network/bisq/pull/4058</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>put in future timeout in case bitcoinj hangs</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4058/files#diff-f706906ce71d42560c4159fa55fd34ef">core/src/main/java/bisq/core/btc/nodes/LocalBitcoinNode.java</a>
    (12)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4058.patch'>https://github.com/bisq-network/bisq/pull/4058.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4058.diff'>https://github.com/bisq-network/bisq/pull/4058.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4058">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVRDK6ADT4ABRS7RHLRHJDB7ANCNFSM4LHEHKSA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVKP44NDYB43IA3KIDRHJDB7A5CNFSM4LHEHKSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IU4DV6Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4058",
"url": "https://github.com/bisq-network/bisq/pull/4058",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>