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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3557#discussion_r342868576">p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java</a>:</p>
<pre style='color:#555'>>  
         boolean containsKey = map.containsKey(hashOfPayload);
-        if (containsKey) {
-            result = result && checkIfStoredDataPubKeyMatchesNewDataPubKey(protectedStorageEntry.getOwnerPubKey(), hashOfPayload);
+
+        // In a hash collision between two well formed ProtectedStorageEntry, the first item wins and will not be overwritten
+        if (containsKey &&
</pre>
<p>Do you have much context on when this condition is expected?</p>
<p>My understanding of the check is to verify that the NewEntry.ownerPubkKey == StoredEntry.ownerPubKey, but how could this fail unless there were identical SeqNr & Payload hashes from different owners? Maybe a misbehaving node sets the value wrong?</p>
<p>I may be missing something really straight forward, but I am happy to update the comment to be more appropriate for the check and not focus on hash collisions.</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/3557?email_source=notifications&email_token=AJFFTNXYAE2M2DJPEELHRDLQSIG6VA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMW6Y#discussion_r342868576">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXPDLJQXOWUNQU6Y4LQSIG6VANCNFSM4JIYDBSA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNUKL536G2AOSEKGUT3QSIG6VA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMW6Y.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/3557?email_source=notifications\u0026email_token=AJFFTNXYAE2M2DJPEELHRDLQSIG6VA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMW6Y#discussion_r342868576",
"url": "https://github.com/bisq-network/bisq/pull/3557?email_source=notifications\u0026email_token=AJFFTNXYAE2M2DJPEELHRDLQSIG6VA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMW6Y#discussion_r342868576",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>