[bisq-network/bisq] Add hash of dao state (#2532)

Manfred Karrer notifications at github.com
Fri Mar 15 02:56:52 UTC 2019


ManfredKarrer commented on this pull request.



> +        //TODO handle reorgs TODO need to start from gen
+
+        byte[] prevHash;
+        int height = block.getHeight();
+        if (daoStateBlockchain.isEmpty()) {
+            // Only at genesis we allow an empty prevHash
+            if (height == genesisTxInfo.getGenesisBlockHeight()) {
+                prevHash = new byte[0];
+            } else {
+                log.warn("DaoStateBlockchain is empty but we received the block which was not the genesis block. " +
+                        "We stop execution here.");
+                return;
+            }
+        } else {
+            // TODO check if in reorg cases it might be a valid case
+            checkArgument(height > daoStateBlockchain.getLast().getBlockHeight(),

Yes correct. Will change and also error msg.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2532#discussion_r265835277
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190314/8b454221/attachment-0001.html>


More information about the bisq-github mailing list