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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3773#discussion_r356255989">core/src/main/java/bisq/core/dao/node/parser/BlockParser.java</a>:</p>
<pre style='color:#555'>>  
         rawBlock.getRawTxs().forEach(rawTx ->
                 txParser.findTx(rawTx,
                         genesisTxId,
                         genesisBlockHeight,
                         genesisTotalSupply)
-                        .ifPresent(txList::add));
+                        .ifPresent(daoStateService::onNewTxForLastBlock));
</pre>
<p>I didn't want anything outside of DaoStateService to be modifying the block list or the tx list within each block, since the txMap cache/index must be kept in sync at all times. In particular, the block parser is calling TxParser.findTx before each new tx is added, which in turn calls DaoStateService, presumably relying on DaoState being consistent. I think this is why it's difficult to make Block.txs completely immutable, since tx's in the partially constructed last block can depend upon each other.</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=AJFFTNQY3CLCGK4DFMHGSKTQX72NHA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWS7DQ#discussion_r356255989">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQZ6K5SMNUFYMGOVGLQX72NHANCNFSM4JZCA3QQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNUR37UEU5B6G2J2D7DQX72NHA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWS7DQ.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=AJFFTNQY3CLCGK4DFMHGSKTQX72NHA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWS7DQ#discussion_r356255989",
"url": "https://github.com/bisq-network/bisq/pull/3773?email_source=notifications\u0026email_token=AJFFTNQY3CLCGK4DFMHGSKTQX72NHA5CNFSM4JZCA3Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOWS7DQ#discussion_r356255989",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>