[bisq-network/bisq-core] Slightly simplify some BlockParser logic (#162)

Manfred Karrer notifications at github.com
Mon Aug 20 20:46:57 UTC 2018


ManfredKarrer requested changes on this pull request.

Can you add the check for the blockHash as well?

> @@ -134,8 +134,10 @@ private void validateIfBlockIsConnecting(RawBlock rawBlock) throws BlockNotConne
         }
     }
 
-    private boolean isBlockNotAlreadyAdded(RawBlock rawBlock) {
-        return !bsqStateService.getBlockAtHeight(rawBlock.getHeight()).isPresent();
+    private boolean isBlockAlreadyAdded(RawBlock rawBlock) {
+        // TODO(chirhonul): shouldn't we verify that we know about the blockHash, not just that the
+        // block heights are the same? how do we handle chainsplits otherwise?

Yes, true.

-- 
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-core/pull/162#pullrequestreview-147815842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180820/216aad21/attachment.html>


More information about the bisq-github mailing list