plenum.common.request.Request.key - python examples

Here are the examples of the python api plenum.common.request.Request.key taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 View Complete Implementation : three_pc_batch.py
Copyright Apache License 2.0
Author : hyperledger
    @staticmethod
    def from_batch_committed_dict(batch_comitted):
        valid_req_keys = [Request(**req_dict).key for req_dict in batch_comitted[f.REQUESTS.nm]]
        return ThreePcBatch(
            ledger_id=batch_comitted[f.LEDGER_ID.nm],
            inst_id=batch_comitted[f.INST_ID.nm],
            view_no=batch_comitted[f.VIEW_NO.nm],
            pp_seq_no=batch_comitted[f.PP_SEQ_NO.nm],
            pp_time=batch_comitted[f.PP_TIME.nm],
            state_root=Ledger.strToHash(batch_comitted[f.STATE_ROOT.nm]),
            txn_root=Ledger.strToHash(batch_comitted[f.TXN_ROOT.nm]),
            primaries=batch_comitted[f.PRIMARIES.nm],
            valid_digests=valid_req_keys,
            pp_digest=batch_comitted[f.DIGEST.nm],
            node_reg=batch_comitted[f.NODE_REG.nm],
            has_audit_txn=f.AUDIT_TXN_ROOT_HASH.nm in batch_comitted and batch_comitted[
                f.AUDIT_TXN_ROOT_HASH.nm] is not None,
            original_view_no=batch_comitted[f.ORIGINAL_VIEW_NO.nm] if f.ORIGINAL_VIEW_NO.nm in batch_comitted else None
        )