[bisq-network/bisq] Improve getBlocks request handling (#4851)

chimp1984 notifications at github.com
Fri Dec 4 16:54:47 CET 2020


@chimp1984 commented on this pull request.



> @@ -168,31 +167,36 @@ public void onFailure(@NotNull Throwable throwable) {
     @Override
     public void onMessage(NetworkEnvelope networkEnvelope, Connection connection) {
         if (networkEnvelope instanceof GetBlocksResponse) {

I prefer to not return early here as this style is commonly used in many places and often there are several if else branches. It is more like a dispatcher or switch case style (if switch would be more flexible in java). I prefer to use the early return for validation use cases but here its more to select the msg we are interested in.  

-- 
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/4851#discussion_r536198851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201204/8bea5839/attachment.htm>


More information about the bisq-github mailing list