Be less promiscuous relaying proposals

This commit is contained in:
JoelKatz
2014-03-11 20:29:38 -07:00
committed by Nik Bougalis
parent 2e8df429df
commit 879c0d6b78
4 changed files with 54 additions and 25 deletions

View File

@@ -1505,11 +1505,13 @@ void NetworkOPsImp::processTrustedProposal (LedgerProposal::pointer proposal,
if (relay)
{
std::set<Peer::ShortId> peers;
getApp().getHashRouter ().swapSet (
proposal->getHashRouter (), peers, SF_RELAYED);
getApp ().getPeers ().foreach (send_if_not (
boost::make_shared<PackedMessage> (*set, protocol::mtPROPOSE_LEDGER),
peer_in_set(peers)));
if (getApp().getHashRouter ().swapSet (
proposal->getSuppressionID (), peers, SF_RELAYED))
{
getApp ().getPeers ().foreach (send_if_not (
boost::make_shared<PackedMessage> (*set, protocol::mtPROPOSE_LEDGER),
peer_in_set(peers)));
}
}
else
{