void setClient(HFClient client) throws CryptoException, InvalidArgumentException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { this.client = client; log.info("Create instance of HFClient"); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); log.info("Set Crypto Suite of HFClient"); }
public HFClient getHFClient() throws CryptoException, InvalidArgumentException, IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException { // Create instance of client. HFClient client = HFClient.createNewInstance(); logger.info("Create instance of HFClient"); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); logger.info("Set Crypto Suite of HFClient"); return client; }
/** * checking config at starting */ public void checkConfig() { userOrg = conf.getSampleOrg(); if (counter == 0) { try { client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); counter++; } catch (Exception e) { logger.error("QueryBlock | checkConfig | " + e); } } try { userOrg.setCAClient(HFCAClient.createNewInstance(userOrg.getCALocation(), userOrg.getCAProperties())); } catch (MalformedURLException e) { logger.error("QueryBlock | checkConfig | " + e); } org.apache.log4j.Level setTo = null; setTo = org.apache.log4j.Level.DEBUG; org.apache.log4j.Logger.getLogger("org.hyperledger.fabric").setLevel(setTo); }
/** * checking config at starting */ public void checkConfig() { userOrg = conf.getSampleOrg(); if (counter == 0) { try { client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); counter++; } catch (Exception e) { logger.error("QueryBlock | checkConfig | " + e); } } try { userOrg.setCAClient(HFCAClient.createNewInstance(userOrg.getCALocation(), userOrg.getCAProperties())); } catch (MalformedURLException e) { logger.error("QueryBlock | checkConfig | " + e); } org.apache.log4j.Level setTo = null; setTo = org.apache.log4j.Level.DEBUG; org.apache.log4j.Logger.getLogger("org.hyperledger.fabric").setLevel(setTo); }
channel.getName(), chaincodeFunction, Arrays.asList(chaincodeArgs))); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client.setUserContext(user); TransactionProposalRequest transactionProposalRequest = client.newTransactionProposalRequest();
channel.getName(), chaincodeFunction, Arrays.asList(chaincodeArgs))); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client.setUserContext(user); TransactionProposalRequest transactionProposalRequest = client.newTransactionProposalRequest();