[bisq-network/bisq] (3/8) [REFACTOR] P2PDataStore::add/remove/refresh (#3557)

Julian Knutsen notifications at github.com
Fri Nov 15 16:29:41 UTC 2019


julianknutsen commented on this pull request.



>  
         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 &&

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.

For ProtectedMailboxStorageEntrys we want the Entry.receiversPubKey to match the Payload.ownerPubKey.

-- 
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/3557#discussion_r346906661
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191115/43b80da5/attachment-0001.html>


More information about the bisq-github mailing list