CCQ/Node: P2P message filter is wrong (#3547)

This commit is contained in:
bruce-riley 2023-11-17 10:59:06 -06:00 committed by GitHub
parent efdb10e39a
commit c9a0b0a691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -137,10 +137,10 @@ func (ccq *ccqP2p) run(
if len(ccq.allowedPeers) == 0 {
return true
}
if _, found := ccq.allowedPeers[from.String()]; found {
if _, found := ccq.allowedPeers[msg.GetFrom().String()]; found {
return true
}
ccq.logger.Info("Dropping message from unknown peer", zap.String("fromPeerID", from.String()))
ccq.logger.Info("Dropping message from unknown peer", zap.String("fromPeerID", from.String()), zap.String("msgPeerID", msg.ReceivedFrom.String()), zap.String("msgFrom", msg.GetFrom().String()))
return false
})
if err != nil {