Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-2007] Gossip: associate self-identity at startup
The gossip uses an identity-mapper object which stores mapping between PKI-IDs of peers to their certificates. The method getOrgOfPeer(PKIID common.PKIidType) api.OrgIdentityType (and others) use the id-mapper to obtain the organization ID of a peer. In future commits it is needed to obtain the organization ID of a message that some peer sent. Sometimes it is a message sent by the peer itself, either because it was gossiped to it in the past, or it hasn't been sent yet. Therefore, instead of comparing each time if the PKI-ID is the peer's PKI-ID, it is easiest to simply add the PKI-ID and identity itself into the identity mapper at its creation. Change-Id: I83b92232bd5d96e6874d6c3d82321fd103e7f238 Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
- Loading branch information