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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3557#discussion_r346906661">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>This has been renamed to matchesRelevantPubKey in later patches. The idea is that for ProtectedStorageEntrys we want the Entry.ownerPubKey to match the Payload.ownerPubKey.</p>
<p>For ProtectedMailboxStorageEntrys we want the Entry.receiversPubKey to match the Payload.ownerPubKey.</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=AJFFTNQFUBQP2R4SHHZOM4TQT3E7LA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCLYC3VY#discussion_r346906661">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNTLAU5HJXM3WFVW26TQT3E7LANCNFSM4JIYDBSA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXM2K24JC2YSALUXHDQT3E7LA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCLYC3VY.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=AJFFTNQFUBQP2R4SHHZOM4TQT3E7LA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCLYC3VY#discussion_r346906661",
"url": "https://github.com/bisq-network/bisq/pull/3557?email_source=notifications\u0026email_token=AJFFTNQFUBQP2R4SHHZOM4TQT3E7LA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCLYC3VY#discussion_r346906661",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>