[bisq-network/bisq-p2p] Extend capability check for networkEnvelop (#10)

Manfred Karrer notifications at github.com
Fri Jun 22 07:55:04 UTC 2018


ManfredKarrer commented on this pull request.



> @@ -283,22 +283,26 @@ public boolean isCapabilitySupported(NetworkEnvelope networkEnvelop) {
             final PersistableNetworkPayload persistableNetworkPayload = ((AddPersistableNetworkPayloadMessage) networkEnvelop).getPersistableNetworkPayload();
             return !(persistableNetworkPayload instanceof CapabilityRequiringPayload) || isCapabilitySupported((CapabilityRequiringPayload) persistableNetworkPayload);
         } else {
-            return true;
+            return !(networkEnvelop instanceof CapabilityRequiringPayload) || isCapabilitySupported((CapabilityRequiringPayload) networkEnvelop);

It should only affect the CapabilityRequiringPayload messages and so far those all have been covered by they first 2 cases as they have been used as storage payloads. With the AckMessage we have a new case which would not have been covered. As well in the BSQ code there will be new cases. E.g. normal network envelopes which are not supported on older client versions so we don't want to send it to those. Those new messages must be "non-critical" anyway as otherwise we would require a hardfork update.

-- 
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-p2p/pull/10#discussion_r197366965
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180622/285bea47/attachment-0001.html>


More information about the bisq-github mailing list