Remove a crash-causing line in slipnet.py.

Without this patch, `python main.py abc aabbcc milk` will reliably crash.
I believe what happens here is that we initialize all the slipnodes and
everything, and then `slipnet.predecessor` becomes `None`, which means
that if that concept ever arises on its own (vs. arising as the "opposite"
of "successor"), we'll be passing around `None` instead of a proper `Slipnode`
and everything goes sideways.

This line doesn't correspond obviously to anything in the Java code,
so I think it's just bogus --- an experiment in "brain damage" that was
accidentally committed?
This commit is contained in:
Arthur O'Dwyer
2017-04-16 02:56:31 -07:00
parent 0ff9d49111
commit d60ba5277c

View File

@ -27,7 +27,6 @@ class SlipNet(object):
self.numberOfUpdates = 0 self.numberOfUpdates = 0
self.__addInitialNodes() self.__addInitialNodes()
self.__addInitialLinks() self.__addInitialLinks()
self.predecessor = None
def __repr__(self): def __repr__(self):
return '<slipnet>' return '<slipnet>'