shrink "improved" topology update

When an update contains an older version of a peer we know about,
there is no point in including our better version in the "improved"
update, since we will have told our neighbours about that already and
any race conditions are taken care off by the periodic sending of the
complete topology.
This commit is contained in:
Matthias Radestock committed 2015-01-25 12:27:45 +00:00
1 parent af6e5c3438
commit 824286d382
2 files changed
+17 -40

No files matched your search

+5 -13
View File
@@ -125,19 +125,11 @@ peers that have just connected
* when a connection is deleted - the update contains just the peer
that lost the connection
The receiver merges it with its own topology model. If the payload is
a subset of the receiver's topology, no further action is
taken. Otherwise, the receiver sends out to all its connections an
"improved" update:
- elements which the original payload added to the receiver are
included
- elements which the original payload updated in the receiver are
included
- elements which are equal between the receiver and the payload are
not included
- elements where the payload was older than the receiver's version
are updated
The receiver merges the update with its own topology model, adding
peers hitherto unknown to it, and updating peers for which the update
contains a more recent version than known to it. If there were any
such new/updated peers, then an improved update containing them is
sent out on all connections.
If the update mentions a peer that the receiver does not know, then
the entire update is rejected and the receiver sends a FetchAll