comment out serialize() for now
until it's implemented fully
This commit is contained in:
parent
f957e9b2fb
commit
9717b67d1b
|
@ -113,8 +113,8 @@ class Boss(object):
|
||||||
file.flush()
|
file.flush()
|
||||||
names[machine].set_trace(tracer)
|
names[machine].set_trace(tracer)
|
||||||
|
|
||||||
def serialize(self):
|
## def serialize(self):
|
||||||
raise NotImplemented
|
## raise NotImplemented
|
||||||
|
|
||||||
# and these are the state-machine transition functions, which don't take
|
# and these are the state-machine transition functions, which don't take
|
||||||
# args
|
# args
|
||||||
|
|
|
@ -66,11 +66,11 @@ class _DelegatedWormhole(object):
|
||||||
def set_code(self, code):
|
def set_code(self, code):
|
||||||
self._boss.set_code(code)
|
self._boss.set_code(code)
|
||||||
|
|
||||||
def serialize(self):
|
## def serialize(self):
|
||||||
s = {"serialized_wormhole_version": 1,
|
## s = {"serialized_wormhole_version": 1,
|
||||||
"boss": self._boss.serialize(),
|
## "boss": self._boss.serialize(),
|
||||||
}
|
## }
|
||||||
return s
|
## return s
|
||||||
|
|
||||||
def send(self, plaintext):
|
def send(self, plaintext):
|
||||||
self._boss.send(plaintext)
|
self._boss.send(plaintext)
|
||||||
|
@ -269,15 +269,15 @@ def create(appid, relay_url, reactor, # use keyword args for everything else
|
||||||
b.start()
|
b.start()
|
||||||
return w
|
return w
|
||||||
|
|
||||||
def from_serialized(serialized, reactor, delegate,
|
## def from_serialized(serialized, reactor, delegate,
|
||||||
journal=None, tor_manager=None,
|
## journal=None, tor_manager=None,
|
||||||
timing=None, stderr=sys.stderr):
|
## timing=None, stderr=sys.stderr):
|
||||||
assert serialized["serialized_wormhole_version"] == 1
|
## assert serialized["serialized_wormhole_version"] == 1
|
||||||
timing = timing or DebugTiming()
|
## timing = timing or DebugTiming()
|
||||||
w = _DelegatedWormhole(delegate)
|
## w = _DelegatedWormhole(delegate)
|
||||||
# now unpack state machines, including the SPAKE2 in Key
|
## # now unpack state machines, including the SPAKE2 in Key
|
||||||
b = Boss.from_serialized(w, serialized["boss"], reactor, journal, timing)
|
## b = Boss.from_serialized(w, serialized["boss"], reactor, journal, timing)
|
||||||
w._set_boss(b)
|
## w._set_boss(b)
|
||||||
b.start() # ??
|
## b.start() # ??
|
||||||
raise NotImplemented
|
## raise NotImplemented
|
||||||
# should the new Wormhole call got_code? only if it wasn't called before.
|
## # should the new Wormhole call got_code? only if it wasn't called before.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user