/** * Register a specified contract. * * @param contract must be a sealed binary. * @param waitTime - wait time for responce. * @param fromPackedTransaction - register contract with Contract.getPackedTransaction() */ @Deprecated public static void registerContract(Contract contract, int waitTime, Boolean fromPackedTransaction) throws IOException { // checkContract(contract); List<ErrorRecord> errors = contract.getErrors(); if (errors.size() > 0) { report("contract has errors and can't be submitted for registration"); report("contract id: " + contract.getId().toBase64String()); addErrors(errors); } else { // contract.seal(); ItemResult r; if (fromPackedTransaction) { r = getClientNetwork().register(contract.getPackedTransaction(), waitTime); } else { r = getClientNetwork().register(contract.getLastSealedBinary(), waitTime); } report("submitted with result:"); report(r.toString()); } }
Thread thread1 = new Thread(() -> { try { ItemResult r1 = clientNetworks.get(index).register(c.getPackedTransaction()); System.out.println("result from thread (" + index + "): " + r1.toString()); } catch (IOException e) {