Skip to content
  • YACOVM's avatar
    [FAB-2758] Decouple anchor peers endpoints from orgIDs · f1a88db2
    YACOVM authored
    In the current implementation of the join channel message in the
    gossip layer, each anchor peer has its own organization, and the
    joinChannel invocation enumerates all anchor peers and builds a
    list of organizationIDs from them.
    
    When https://gerrit.hyperledger.org/r/#/c/7105/
    
     will be introduced,
    it will be needed to create a channel only with either no anchor peers
    or anchor peers of the organization of the channel creator.
    This would confuse the gossip layer because it'll derive that each channel
    has only 1 organization instead of the original participants.
    
    I decoupled the anchor peers from the organization IDs by changing
    the JoinChannelMessage interface in api/channel.go to have
    Members() []OrgIdentityType  which would
    return the channel members (organizations)
    and AnchorPeersOf(org OrgIdentityType) []AnchorPeer which would
    return for each organization, its corresponding anchor peers.
    
    Also (of course) updated the tests accordingly.
    
    Change-Id: I90131a0726fc7ca68fd750247f4df558c5cca0fd
    Signed-off-by: default avatarYacov Manevich <yacovm@il.ibm.com>
    f1a88db2