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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3773#discussion_r356251682">core/src/main/java/bisq/core/dao/state/DaoStateService.java</a>:</p>
<pre style='color:#555'>>      }
 
     public Set<Tx> getTxs() {
-        return getTxStream().collect(Collectors.toSet());
+        return new HashSet<>(getTxMap().values());
</pre>
<p>I switched it from getTxStream() to getTxMap.values() for slightly better performance, as more indirection is required to iterate through all the block tx lists (and many of the blocks are empty). They're not interchangeable elsewhere, though, since getTxMap.values() is unordered. It doesn't matter in this case since (before and after) it's just collecting into an unordered set.</p>
<p>Actually, the only place getTxs() is used is in one of the views to get the total number of transactions (using size()), so it doesn't need to collect into a new HashSet and the return type could just be a Collection.</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=AJFFTNXVUPY5AK7KKYFGKX3QX7ZHFA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWRS6A#discussion_r356251682">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNRVYDWB5FME574TVJ3QX7ZHFANCNFSM4JZCA3QQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNRCD4XDRM3ONRZIAQDQX7ZHFA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWRS6A.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=AJFFTNXVUPY5AK7KKYFGKX3QX7ZHFA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWRS6A#discussion_r356251682",
"url": "https://github.com/bisq-network/bisq/pull/3773?email_source=notifications\u0026email_token=AJFFTNXVUPY5AK7KKYFGKX3QX7ZHFA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWRS6A#discussion_r356251682",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>