def test_propagate_request(looper, node, sdk_wallet_steward, req): # Emulate Received PROPAGATE with the req propagate = Propagate(req.as_dict, "client_name") msg = emulate_received(node, propagate) # Create a new (requested) Propagate from the received data ph = PropagateHandler(node) kwargs = {f.DIGEST.nm: req.digest} received_propagate = ph.create(msg, **kwargs) assert received_propagate == propagate
def __init__(self, metrics=NullMetricsCollector): self.metrics = metrics self.handlers = { LEDGER_STATUS: LedgerStatusHandler(self), CONSISTENCY_PROOF: ConsistencyProofHandler(self), PROPAGATE: PropagateHandler(self) }
def __init__(self): self.handlers = { LEDGER_STATUS: LedgerStatusHandler(self), CONSISTENCY_PROOF: ConsistencyProofHandler(self), PREPREPARE: PreprepareHandler(self), PREPARE: PrepareHandler(self), PROPAGATE: PropagateHandler(self) }