Commit 29e557f9 authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Move FloodingNode so code is alphabetical

parent 01bf7090
......@@ -405,19 +405,6 @@ class Node:
)
class FloodingNode(Node):
"""Node which forwards through flooding."""
def forward(self, packet):
"""Forward to all neighbour nodes."""
forward = {
neighbour: 'flood'
for neighbour in self.neighbours
}
return forward
class EpidemicNode(Node):
"""Node which forwards epidemically."""
......@@ -462,6 +449,19 @@ class EpidemicNode(Node):
del self.__sent[packet]
class FloodingNode(Node):
"""Node which forwards through flooding."""
def forward(self, packet):
"""Forward to all neighbour nodes."""
forward = {
neighbour: 'flood'
for neighbour in self.neighbours
}
return forward
Contact = namedtuple('Contact', ['time', 'a', 'b', 'join'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment