The P2PPeerSelectionForSendRequest function is invoked for each message and request which is about to be sent out to the network. We need to pass the request or message to that function so that it can make peer selection decisions on a per-request (P2PRequestPacket) and per-message (P2PMessagePacket) basis.
We should try to split up the P2PPeerSelectionForSendRequest into two:
peerSelectionForSend and
peerSelectionForRequest
By default, we could pass the same selection function to both properties.
This is needed for the module subnet feature.
Actual behavior
Right now the function only receives peers, nodeInfo and numOfPeers.
Expected behavior
The
P2PPeerSelectionForSendRequest
function is invoked for each message and request which is about to be sent out to the network. We need to pass the request or message to that function so that it can make peer selection decisions on a per-request (P2PRequestPacket
) and per-message (P2PMessagePacket
) basis.We should try to split up the
P2PPeerSelectionForSendRequest
into two:peerSelectionForSend
andpeerSelectionForRequest
By default, we could pass the same selection function to both properties.
This is needed for the module subnet feature.
Actual behavior
Right now the function only receives
peers
,nodeInfo
andnumOfPeers
.