-
YACOVM authored
In the previous commit we extended the comm layer to support deep scanning of remote peers in order to know whether anchor peers are indeed in the organization it is claimed (in the genesis block) they are. This commit connects between the gossip join-channel logic and this capability into the discovery layer, and makes the gossip logic pass a predicate into the Connect() method of the discovery layer that determines at runtime (as soon as the remote peer is available) - whether the anchor peer is indeed in our organization or not. Also changed the test in a way to check that such a spoofing doesn't work anymore: I added a 3rd anchor peer which is from orgB but is claimed to be in orgA. When I ran the test, it passed and the gossip code complained as follows: ---------------------------------------------------------- WARN 007 Anchor peer localhost:11616 isn't in our org, but is claimed to be Signed-off-by: Yacov Manevich <yacovm@il.ibm.com> Change-Id: I2d92628cc5428cc4194a0f3909eb13562b7588a4
19e07d78