Open gavin-norman-sociomantic opened 5 years ago
I believe the separation of turtle node from the actual node implementation is a historical artefact from the days when the fake nodes lived partially in turtle. It seems to be unnecessary now.
https://github.com/sociomantic-tsunami/dlsproto/pull/101 gives a rough example of how this change simplifies the code for a fake node.
Hm, this doesn't look like any code I have written and turtle definitely doesn't care so I'd say "whatever fits you best" :)
It was derived from code in turtle that you wrote originally.
I pretty sure that it was you who wrote that code in turtle originally :) I copied it to swarm with almost no changes when splitting things.
I pretty sure that it was you who wrote that code in turtle originally :) I copied it to swarm with almost no changes when splitting things.
Could be :) Mainly I'm interested in your opinion on the concept, and whether I'm missing some subtlety of turtle.
AFAIR turtle only cares that nodes stop printing messages once unregister
is called and everything else is completely up to you.
Adapted with working restart. (Still super rough.)
Tidied up.
D2 fixes.
Still TODO:
NodeBase
are breaking, and whether there's a non-breaking way of doing them.Needs rebase now.
Rebased.
Hmmmm
./src/swarm/node/model/Node.d(702): Error: class swarm.node.model.Node.TestNode interface function INode.restartListeners isn't implemented
./src/swarm/node/model/Node.d(702): Error: class swarm.node.model.Node.TestNode interface function INode.restartListeners isn't implemented
./src/swarm/node/model/Node.d(702): Error: class swarm.node.model.Node.TestNode interface function INode.restartListeners isn't implemented```
I also left a review on this PR :-)
Ohh shit. I changed INodeBase
, but only adapted the neo node classes that implement that interface :/
Updated.
@gavin-norman-sociomantic was there anything left for this PR from your side? It looks fine to me but there is a plenty of neo stuff I have no idea about :)
The PR looks sensible to me, in isolation. I think it was waiting on trying to adapt one of the proto fake nodes, to confirm that it works (and is helpful) in practice.
Ah, this appears to be a test of adapting a *proto to use this: https://github.com/sociomantic-tsunami/dlsproto/pull/101
(Currently based on #350. Only the last commit is relevant.)