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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3773#discussion_r356825145">core/src/main/java/bisq/core/dao/state/model/DaoState.java</a>:</p>
<pre style='color:#555'>> @@ -145,6 +154,10 @@ private DaoState(int chainHeight,
         this.paramChangeList = paramChangeList;
         this.evaluatedProposalList = evaluatedProposalList;
         this.decryptedBallotsWithMeritsList = decryptedBallotsWithMeritsList;
+
+        txMap = blocks.stream()
+                .flatMap(block -> block.getTxs().stream())
+                .collect(Collectors.toMap(Tx::getId, Function.identity(), (x, y) -> y, HashMap::new));
</pre>
<p>With the <code>(x, y) -> y</code> merge function it's currently using, it will always select the last tx with a given txId from the tx stream when building the map, whereas in the original code <code>getTx</code> is calling <code>findAny</code> on the filtered <code>getTxStream</code> output, which will probably behave the same as <code>findFirst</code> in this case. So perhaps the merge function should be <code>(x, y) -> x</code> to be absolutely sure the behaviour doesn't change.</p>
<p>Also, for consistent merge behaviour, <code>putIfAbsent</code> would need to be substituted into the line:</p>
<blockquote>
<p><code>daoState.getTxMap().put(tx.getId(), tx);</code></p>
</blockquote>
<p>in <code>DaoState.onNewTxForLastBlock</code>.</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/3773?email_source=notifications&email_token=AJFFTNQQR3KEW3PA2D3X7DTQYFGU3A5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCO4BNVA#discussion_r356825145">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQXIWTEKWIRMIVAG6DQYFGU3ANCNFSM4JZCA3QQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNSFNPSEVTZJSMG4ISDQYFGU3A5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCO4BNVA.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/3773?email_source=notifications\u0026email_token=AJFFTNQQR3KEW3PA2D3X7DTQYFGU3A5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCO4BNVA#discussion_r356825145",
"url": "https://github.com/bisq-network/bisq/pull/3773?email_source=notifications\u0026email_token=AJFFTNQQR3KEW3PA2D3X7DTQYFGU3A5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCO4BNVA#discussion_r356825145",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>