<p><b>@freimair</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/2469#discussion_r263339306">p2p/src/main/java/bisq/network/p2p/network/Connection.java</a>:</p>
<pre style='color:#555'>>          } else {
-            return msg instanceof CapabilityRequiringPayload && sharedModel.isCapabilitySupported(((CapabilityRequiringPayload) msg).getRequiredCapabilities());
+            return true;
</pre>
<p>I thought about changing stuff around but it quickly gets dirty.</p>
<p>Most beautiful would be that we do not need the method at all but instead can use a <code>connection.isCapabilitySupported(msg)</code> or <code>isCapabilitySupported(msg)</code> directly. However, the class hierarchy has grown overly complicated over time and such a solution is not possible as things stand now (would result in a diamond pattern if Java would allow for that).</p>
<p>Even looks worse if depicted like that:<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/1070734/53952939-6eef5800-40d2-11e9-8ca4-1059082d07d9.png"><img src="https://user-images.githubusercontent.com/1070734/53952939-6eef5800-40d2-11e9-8ca4-1059082d07d9.png" alt="messages" style="max-width:100%;"></a></p>
<p>I even tried to use java8/9 defaults in interfaces and create some sort of mixins. Nasty stuff. Definitely needs cleanup! Small steps...</p>

<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/2469#discussion_r263339306">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtmaJHghPCFyH3RMaedIp444Qn2kWks5vUPW_gaJpZM4bRz-x">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtk_OeCCEg1zoAGy5PoXMqdBvnPCtks5vUPW_gaJpZM4bRz-x.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq","title":"bisq-network/bisq","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq"}},"updates":{"snippets":[{"icon":"PERSON","message":"@freimair commented on #2469"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq/pull/2469#discussion_r263339306"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/2469#discussion_r263339306",
"url": "https://github.com/bisq-network/bisq/pull/2469#discussion_r263339306",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>