FAB-1723 Fix peers filtering for gossip push/pull
FAB-1723 Fix peers filtering for gossip push/pull

File gossip/filter/filter.go

Method SelectPeer - in case of small k, log(membership) for example,
and many small channels in most cases it will return empty list -
as first step it choose k peers from membership and only after that
filter them, as result it will remain with zero peers

Correct way to implement it is filter peers first and only after that
choose k peers from filtered list.

Change-Id: I1577df37cc8441adf7e96a0e847dc901afd60ea8
Signed-off-by: Gennady Laventman <87d50829f3c43c4a683f1cfaff008eb04d3760cb@il.ibm.com>

manish-sethi/fabric-sidedb,rameshbabu79/fabric,magg/fabric,kchristidis/fabric,bmos299/fabric,ibmmark/fabric,manish-sethi/fabric-sidedb,ibmmark/fabric,phariel/fabric,cophey/fabric,phariel/fabric,lukehuangch/fabric,rameshthoomu/fabric,stemlending/fabric,masterDev1985/fabric,masterDev1985/fabric,ckeyer/fabric,ibmmark/fabric,thakkarparth007/fabric,Ryan--Yang/fabric,Ryan--Yang/fabric,blockc/fabric,king3000/fabric,Ryan--Yang/fabric,cophey/fabric,lukehuangch/fabric,rameshbabu79/fabric,Ryan--Yang/fabric,lukehuangch/fabric,magg/fabric,lukehuangch/fabric,tkuhrt/fabric,thakkarparth007/fabric,binhn/fabric,xixuejia/fabric,muralisrini/fabric,kchristidis/fabric,mffrench/fabric,cophey/fabric,chrisguoado/fabric,king3000/fabric,magg/fabric,chrisguoado/fabric,thakkarparth007/fabric,manish-sethi/fabric-sidedb,xixuejia/fabric,jimthematrix/fabric,cophey/fabric,hyperledger/fabric,blockc/fabric,rameshthoomu/fabric,manish-sethi/fabric-sidedb,hyperledger/fabric,blockc/fabric,ibmmark/fabric,mqshen/fabric,bmos299/fabric,magg/fabric,blockc/fabric,bmos299/fabric,kchristidis/fabric,mqshen/fabric,mffrench/fabric,thakkarparth007/fabric,lukehuangch/fabric,mqshen/fabric,bmos299/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,Ryan--Yang/fabric,muralisrini/fabric,magg/fabric,bmos299/fabric,phariel/fabric,masterDev1985/fabric,ckeyer/fabric,manish-sethi/fabric,ibmmark/fabric,ibmmark/fabric,masterDev1985/fabric,phariel/fabric,manish-sethi/fabric-sidedb,bmos299/fabric,muralisrini/fabric,king3000/fabric,cophey/fabric,phariel/fabric,mqshen/fabric,mqshen/fabric,ibmmark/fabric,mqshen/fabric,blockc/fabric,rameshbabu79/fabric,thakkarparth007/fabric,tkuhrt/fabric,phariel/fabric,king3000/fabric,lukehuangch/fabric,Ryan--Yang/fabric,Ryan--Yang/fabric,binhn/fabric,mffrench/fabric,kchristidis/fabric,ckeyer/fabric,masterDev1985/fabric,manish-sethi/fabric,mqshen/fabric,kchristidis/fabric,king3000/fabric,ckeyer/fabric,tkuhrt/fabric,bmos299/fabric,cophey/fabric,jimthematrix/fabric,chrisguoado/fabric,mffrench/fabric,chrisguoado/fabric,blockc/fabric,tkuhrt/fabric,lukehuangch/fabric,rameshthoomu/fabric,mffrench/fabric,rameshbabu79/fabric,rameshthoomu/fabric,cophey/fabric,chrisguoado/fabric,binhn/fabric,rameshthoomu/fabric,ckeyer/fabric,stemlending/fabric,chrisguoado/fabric,rameshbabu79/fabric,magg/fabric,thakkarparth007/fabric,king3000/fabric,mffrench/fabric,mffrench/fabric,rameshthoomu/fabric,stemlending/fabric,tkuhrt/fabric,chrisguoado/fabric,xixuejia/fabric,tkuhrt/fabric,kchristidis/fabric,thakkarparth007/fabric,blockc/fabric,king3000/fabric,magg/fabric,phariel/fabric,kchristidis/fabric,rameshthoomu/fabric,tkuhrt/fabric,ckeyer/fabric,ckeyer/fabric,manish-sethi/fabric-sidedb