def prepare_batch(self):
<EOL>for _, metadata in self.certificates_to_issue.items():<EOL><INDENT>self.certificate_handler.validate_certificate(metadata)<EOL><DEDENT>with FinalizableSigner(self.secret_manager) as signer:<EOL><INDENT>for _, metadata in self.certificates_to_issue.items():<EOL><INDENT>self.certificate_handler.sign_certificate(signer, metadata)<EOL><DEDENT><DEDENT>self.merkle_tree.populate(self.get_certificate_generator())<EOL>logging.info('<STR_LIT>', b2h(self.merkle_tree.get_blockchain_data()))<EOL>return self.merkle_tree.get_blockchain_data()<EOL>
Propagates exception on failure
:return: byte array to put on the blockchain