use of com.hedera.services.exceptions.UnknownHederaFunctionality in project hedera-services by hashgraph.
the class SigRequirements method mergeScheduledKeys.
private <T> Optional<SigningOrderResult<T>> mergeScheduledKeys(final List<JKey> required, final TransactionBody scheduledTxn, final SigningOrderResultFactory<T> factory, @Nullable final LinkedRefs linkedRefs) {
try {
final var scheduledFunction = MiscUtils.functionOf(scheduledTxn);
if (IMPOSSIBLE_TO_SCHEDULE.contains(scheduledFunction)) {
return Optional.of(factory.forUnschedulableTxn());
}
var scheduledOrderResult = keysForOtherParties(scheduledTxn, factory, linkedRefs);
if (scheduledOrderResult.hasErrorReport()) {
return Optional.of(factory.forUnresolvableRequiredSigners());
} else {
var scheduledKeys = scheduledOrderResult.getOrderedKeys();
for (JKey key : scheduledKeys) {
var dup = key.duplicate();
dup.setForScheduledTxn(true);
required.add(dup);
}
}
} catch (UnknownHederaFunctionality e) {
return Optional.of(factory.forUnschedulableTxn());
}
return Optional.empty();
}
Aggregations