[bisq-network/bisq-core] Slightly simplify some BlockParser logic (#162)
chirhonul
notifications at github.com
Tue Aug 21 08:33:45 UTC 2018
chirhonul 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?
That seems beyond the scope of the current PR (which is a refactor with no functional changes), which is why I added it as a `TODO` here. I'd be happy to address it in a follow-up PR.
--
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_r211521000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180821/ea2863d3/attachment.html>
More information about the bisq-github
mailing list