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

Manfred Karrer notifications at github.com
Tue Aug 21 22:01:07 UTC 2018


ManfredKarrer commented on this pull request.



> @@ -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?

Ok.

-- 
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#discussion_r211774192
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180821/09a6baf7/attachment.html>


More information about the bisq-github mailing list