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:
@ -27,7 +27,6 @@ class SlipNet(object):
|
||||
self.numberOfUpdates = 0
|
||||
self.__addInitialNodes()
|
||||
self.__addInitialLinks()
|
||||
self.predecessor = None
|
||||
|
||||
def __repr__(self):
|
||||
return '<slipnet>'
|
||||
|
||||
Reference in New Issue
Block a user