def isFinalised(self, f): if self.finalised is None: req = checkIfMoreThanFSameItems([v.__getstate__() for v in self.propagates.values()], f) if req: self.finalised = Request.fromState(req) return self.finalised
def set_finalised(self, req): # TODO: make it much explicitly and simpler # !side affect! if `req` is an instance of a child of `Request` class # here we construct the parent from child it is rather implicit that # `finalised` contains not the same type than `propagates` has self.finalised = Request.fromState(req.__getstate__()) self.added_ts = None self.finalised_ts = time.perf_counter()
def deserializeReq(self, serReq: str) -> Request: return Request.fromState(self.txnSerializer.deserialize(serReq))
def deserializeReq(serReq: str) -> Request: return Request.fromState(json.loads(serReq))