summaryrefslogtreecommitdiff
path: root/node/Multicaster.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-03 10:29:56 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-03 10:29:56 -0400
commit63fa4a684d15409e185422e7641e7c4680d19ec3 (patch)
treef24b0535aed69c5eccd415c344675836d6349772 /node/Multicaster.hpp
parent3635a940f921a10f229d67a30fde1be650d3a28e (diff)
parent80d8b7d0ae56f1dce8b5b25ab7930df436755daf (diff)
downloadinfinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.tar.gz
infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.zip
Merge my adamierymenko-dev into the new master that incorporates Raspberry Pi build changes in order to keep everything in sync.
Diffstat (limited to 'node/Multicaster.hpp')
-rw-r--r--node/Multicaster.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/node/Multicaster.hpp b/node/Multicaster.hpp
index 1addf42d..ac89f84b 100644
--- a/node/Multicaster.hpp
+++ b/node/Multicaster.hpp
@@ -261,9 +261,21 @@ public:
bf.set((peers[chosen++] = *i)->address().sum());
// Add a supernode if there are fewer than the desired
- // number of recipients.
+ // number of recipients. Note that we do not use the bloom
+ // filter to track visits to supernodes, intentionally
+ // allowing multicasts to ping pong between supernodes.
+ // Supernodes propagate even messages they've already seen,
+ // while regular nodes do not. Thus this ping-ponging will
+ // cause the supernodes to pick new starting points for
+ // peer to peer graph traversal multiple times. It's a
+ // simple, stateless way to increase supernode-driven
+ // propagation of a multicast in the event that peer to
+ // peer connectivity for its group is sparse.
if (chosen < max) {
- P peer = topology.getBestSupernode(&originalSubmitter,1,true);
+ Address avoid[2];
+ avoid[0] = originalSubmitter;
+ avoid[1] = upstream;
+ P peer = topology.getBestSupernode(avoid,2,true);
if (peer)
peers[chosen++] = peer;
}