def test_process_ordered(message_req_service: MessageReqService, internal_bus, data, pp, fill_requested_lists): pp_seq_no = msg_count // 2 view_no = 0 ord_args = [ pp.instId, view_no, pp.reqIdr, [], pp_seq_no, pp.ppTime, pp.ledgerId, pp.stateRootHash, pp.txnRootHash, pp.auditTxnRootHash, ["Alpha", "Beta"], ["Alpha", "Beta", "Gamma", "Delta"], view_no, 'digest' ] msg = Ordered(*ord_args) internal_bus.send(msg) for key, handler in message_req_service.handlers.items(): if key not in message_req_service.three_pc_handlers: continue for requested_pp_seq_no in range(msg_count): if requested_pp_seq_no == pp_seq_no: assert (view_no, pp_seq_no) not in handler.requested_messages else: assert (view_no, requested_pp_seq_no) in handler.requested_messages
def create_ordered(pp): ord_args = [ pp.instId, pp.viewNo, pp.reqIdr, [], pp.ppSeqNo, pp.ppTime, pp.ledgerId, pp.stateRootHash, pp.txnRootHash, pp.auditTxnRootHash ] return Ordered(*ord_args)
def ordered(pre_prepare): ord_args = [ pre_prepare.instId, pre_prepare.viewNo, pre_prepare.reqIdr, [], pre_prepare.ppSeqNo, pre_prepare.ppTime, pre_prepare.ledgerId, pre_prepare.stateRootHash, pre_prepare.txnRootHash, pre_prepare.auditTxnRootHash, ["Alpha", "Beta"] ] return Ordered(*ord_args)