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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4953#discussion_r546385492">core/src/main/java/bisq/core/account/sign/SignedWitnessService.java</a>:</p>
<pre style='color:#555'>> @@ -487,8 +509,18 @@ private boolean verifyDate(SignedWitness signedWitness, long childSignedWitnessD
     ///////////////////////////////////////////////////////////////////////////////////////////
 
     @VisibleForTesting
-    void addToMap(SignedWitness signedWitness) {
-        signedWitnessMap.putIfAbsent(signedWitness.getHashAsByteArray(), signedWitness);
+    public void addToMap(SignedWitness signedWitness) {
+        P2PDataStorage.ByteArray hash = signedWitness.getHashAsByteArray();
+        signedWitnessMap.putIfAbsent(hash, signedWitness);
+
+        // We remove the entry with that hash in case we have cached it, so at the next getSignedWitnessSet
+        // call we use the updated signedWitnessMap to re-fill our cache.
+        getSignedWitnessSetCache.remove(new P2PDataStorage.ByteArray(signedWitness.getAccountAgeWitnessHash()));
+
+        // Not sure if that is needed as well, tests did succeed in both cases, but seems to be more safe to remove
+        // potential entries with hash as well. A removed item in getSignedWitnessSetCache carries no risk, though a
+        // remaining item would.
+        getSignedWitnessSetCache.remove(hash);
</pre>
<p>I looked up in the code and both fields are different!</p>
<pre><code>byte[] data = Utilities.concatenateByteArrays(accountAgeWitnessHash, signature);
data = Utilities.concatenateByteArrays(data, signerPubKey);
hash = Hash.getSha256Ripemd160hash(data);
        
public P2PDataStorage.ByteArray getHashAsByteArray() {
        return new P2PDataStorage.ByteArray(hash);
}
</code></pre>

<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/4953#discussion_r546385492">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNTZGGX7NF3JOC6E7ZLSVYD4JANCNFSM4U32MFNA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNW6BRUZZIZODWN5WCTSVYD4JA5CNFSM4U32MFNKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEESD42Q.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/4953#discussion_r546385492",
"url": "https://github.com/bisq-network/bisq/pull/4953#discussion_r546385492",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>