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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3557#discussion_r342867808">p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java</a>:</p>
<pre style='color:#555'>> -        boolean result = sequenceNrValid &&
-                checkPublicKeys(protectedStorageEntry, true)
-                && checkSignature(protectedStorageEntry);
+        // TODO: Combine with hasSequenceNrIncreased check, but keep existing behavior for now
+        if(!isSequenceNrValid(protectedStorageEntry.getSequenceNumber(), hashOfPayload) ) {
+            log.trace("addProtectedStorageEntry failed due to invalid sequence number");
+
+            return false;
+        }
+
+        // Verify the ProtectedStorageEntry is well formed and valid for the add operation
+        if (!checkPublicKeys(protectedStorageEntry, true) ||
+                !checkSignature(protectedStorageEntry)) {
+
+            log.trace("addProtectedStorageEntry failed due to invalid entry");
+            return false;
</pre>
<p>The helper methods already have verbose logging and each case will print out a separate message. I updated this PR to only add new messages for the failures that didn't have them before. It is worth another pass to clean these up again, but I don't want to pollute this stack with those changes.</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=AJFFTNT2N3ONG62RD2JFFXLQSIGRTA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMOWY#discussion_r342867808">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNTAPLEAK6XGREOAKMTQSIGRTANCNFSM4JIYDBSA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQPLCSYEQLYCWFSMPLQSIGRTA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMOWY.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=AJFFTNT2N3ONG62RD2JFFXLQSIGRTA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMOWY#discussion_r342867808",
"url": "https://github.com/bisq-network/bisq/pull/3557?email_source=notifications\u0026email_token=AJFFTNT2N3ONG62RD2JFFXLQSIGRTA5CNFSM4JIYDBSKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCKNMOWY#discussion_r342867808",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>