Skip to content

Commit

Permalink
style: remove unused imports and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Jun 8, 2023
1 parent 520d925 commit 948e127
Showing 1 changed file with 0 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,6 @@ package org.dashj.platform.dpp.errors.concensus

import org.dashj.platform.dpp.errors.ConcensusErrorMetadata
import org.dashj.platform.dpp.errors.DPPException
import org.dashj.platform.dpp.errors.concensus.basic.IncompatibleProtocolVersionException
import org.dashj.platform.dpp.errors.concensus.basic.JsonSchemaException
import org.dashj.platform.dpp.errors.concensus.basic.UnsupportedProtocolVersionException
import org.dashj.platform.dpp.errors.concensus.basic.datacontract.InvalidDataContractIdException
import org.dashj.platform.dpp.errors.concensus.basic.document.MissingDataContractIdException
import org.dashj.platform.dpp.errors.concensus.basic.identity.IdentityAssetLockTransactionOutPointAlreadyExistsException
import org.dashj.platform.dpp.errors.concensus.basic.identity.InvalidIdentityKeySignatureException
import org.dashj.platform.dpp.errors.concensus.basic.identity.InvalidInstantAssetLockProofException
import org.dashj.platform.dpp.errors.concensus.basic.identity.InvalidInstantAssetLockProofSignatureException
import org.dashj.platform.dpp.errors.concensus.basic.statetransition.InvalidStateTransitionTypeException
import org.dashj.platform.dpp.errors.concensus.basic.statetransition.MissingStateTransitionTypeException
import org.dashj.platform.dpp.errors.concensus.document.DataContractNotPresentException
import org.dashj.platform.dpp.errors.concensus.fee.BalanceIsNotEnoughException
import org.dashj.platform.dpp.errors.concensus.signature.IdentityNotFoundException
import org.dashj.platform.dpp.errors.concensus.signature.InvalidIdentityPublicKeyTypeException
import org.dashj.platform.dpp.errors.concensus.signature.InvalidSignaturePublicKeySecurityLevelException
import org.dashj.platform.dpp.errors.concensus.signature.InvalidStateTransitionSignatureException
import org.dashj.platform.dpp.errors.concensus.signature.MissingPublicKeyException
import org.dashj.platform.dpp.errors.concensus.signature.PublicKeyIsDisabledException
import org.dashj.platform.dpp.errors.concensus.state.document.DocumentAlreadyPresentException
import org.dashj.platform.dpp.errors.concensus.state.document.InvalidDocumentRevisionException
import org.dashj.platform.dpp.errors.concensus.state.identity.DuplicatedIdentityPublicKeyException
import org.dashj.platform.dpp.errors.concensus.state.identity.IdentityAlreadyExistsException
import org.dashj.platform.dpp.toBase64
import org.dashj.platform.dpp.util.Cbor

Expand Down Expand Up @@ -78,79 +55,6 @@ abstract class ConcensusException(message: String) : DPPException(message) {
private fun createException(code: Codes, arguments: List<Any>): ConcensusException {
return object : ConcensusException("error $code, $arguments") {}
}
// return when (code) {
// // remove unneeded errors
//// Codes.ProtocolVersionParsingError -> ProtocolVersionParsingException(arguments)
//// Codes.SerializedObjectParsingError -> SerializedObjectParsingException(arguments)
// Codes.UnsupportedProtocolVersionError -> UnsupportedProtocolVersionException(arguments)
// Codes.IncompatibleProtocolVersionError -> IncompatibleProtocolVersionException(arguments)
//// Codes.JsonSchemaCompilationError -> JsonSchemaCompilationException(arguments)
// Codes.JsonSchemaError -> JsonSchemaException(arguments)
//// Codes.InvalidIdentifierError -> InvalidIdentifierException(arguments)
////
//// Codes.DataContractMaxDepthExceedError -> DataContractMaxDepthExceedException(arguments)
//// Codes.DuplicateIndexError -> DuplicateIndexException(arguments)
//// Codes.IncompatibleRe2PatternError -> IncompatibleRe2PatternException(arguments)
//// Codes.InvalidCompoundIndexError -> InvalidCompoundIndexException(arguments)
// Codes.InvalidDataContractIdError -> InvalidDataContractIdException(arguments)
//// Codes.InvalidIndexedPropertyConstraintError -> InvalidIndexedPropertyConstraintException(arguments)
//// Codes.InvalidIndexPropertyTypeError -> InvalidIndexPropertyTypeException(arguments)
//// Codes.InvalidJsonSchemaRefError -> InvalidJsonSchemaRefException(arguments)
//// Codes.SystemPropertyIndexAlreadyPresentError -> SystemPropertyIndexAlreadyPresentException(arguments)
//// Codes.UndefinedIndexPropertyError -> UndefinedIndexPropertyException(arguments)
//// Codes.UniqueIndicesLimitReachedError -> UniqueIndicesLimitReachedException(arguments)
// Codes.DataContractNotPresentError -> DataContractNotPresentException(arguments)
//// Codes.DuplicateDocumentTransitionsWithIdsError -> DuplicateDocumentTransitionsWithIdsException(arguments)
//// Codes.DuplicateDocumentTransitionsWithIndicesError -> DuplicateDocumentTransitionsWithIndicesException(arguments)
//// Codes.InconsistentCompoundIndexDataError -> InconsistentCompoundIndexDataException(arguments)
//// Codes.InvalidDocumentTransitionActionError -> InvalidDocumentTransitionActionException(arguments)
//// Codes.InvalidDocumentTransitionIdError -> InvalidDocumentTransitionIdException(arguments)
//// Codes.InvalidDocumentTypeError -> InvalidDocumentTypeException(arguments)
// Codes.MissingDataContractIdError -> MissingDataContractIdException(arguments)
//// Codes.MissingDocumentTransitionActionError -> MissingDocumentTransitionActionException(arguments)
//// Codes.MissingDocumentTransitionTypeError -> MissingDocumentTransitionTypeException(arguments)
//// Codes.MissingDocumentTypeError -> MissingDocumentTypeException(arguments)
// Codes.DuplicatedIdentityPublicKeyError -> DuplicatedIdentityPublicKeyException(arguments)
//// Codes.DuplicatedIdentityPublicKeyIdError -> DuplicatedIdentityPublicKeyIdException(arguments)
//// Codes.IdentityAssetLockProofLockedTransactionMismatchError -> IdentityAssetLockProofLockedTransactionMismatchException(arguments)
//// Codes.IdentityAssetLockTransactionIsNotFoundError -> IdentityAssetLockTransactionIsNotFoundException(arguments)
// Codes.IdentityAssetLockTransactionOutPointAlreadyExistsError ->
// IdentityAssetLockTransactionOutPointAlreadyExistsException(arguments)
//// Codes.IdentityAssetLockTransactionOutputNotFoundError -> IdentityAssetLockTransactionOutputNotFoundException(arguments)
//// Codes.InvalidAssetLockProofCoreChainHeightError -> InvalidAssetLockProofCoreChainHeightException(arguments)
//// Codes.InvalidAssetLockProofTransactionHeightError -> InvalidAssetLockProofTransactionHeightException(arguments)
// Codes.InvalidIdentityKeySignatureError -> InvalidIdentityKeySignatureException(arguments)
//// Codes.InvalidIdentityAssetLockTransactionError -> InvalidIdentityAssetLockTransactionException(arguments)
//// Codes.InvalidIdentityAssetLockTransactionOutputError -> InvalidIdentityAssetLockTransactionOutputException(arguments)
//// Codes.InvalidIdentityPublicKeyDataError -> InvalidIdentityPublicKeyDataException(arguments)
// Codes.InvalidInstantAssetLockProofError -> InvalidInstantAssetLockProofException(arguments)
// Codes.InvalidInstantAssetLockProofSignatureError ->
// InvalidInstantAssetLockProofSignatureException(arguments)
// Codes.InvalidStateTransitionTypeError -> InvalidStateTransitionTypeException(arguments)
// Codes.MissingStateTransitionTypeError -> MissingStateTransitionTypeException()
//// Codes.StateTransitionMaxSizeExceededError -> StateTransitionMaxSizeExceededException(arguments)
// Codes.IdentityNotFoundError -> IdentityNotFoundException(arguments)
// Codes.InvalidIdentityPublicKeyTypeError -> InvalidIdentityPublicKeyTypeException(arguments)
// Codes.InvalidStateTransitionSignatureError -> InvalidStateTransitionSignatureException()
// Codes.MissingPublicKeyError -> MissingPublicKeyException(arguments)
// Codes.PublicKeyIsDisabledError -> PublicKeyIsDisabledException(arguments)
// Codes.InvalidSignaturePublicKeySecurityLevelError ->
// InvalidSignaturePublicKeySecurityLevelException(arguments)
// Codes.BalanceIsNotEnoughError -> BalanceIsNotEnoughException(arguments)
//// Codes.DataContractAlreadyPresentError -> DataContractAlreadyPresentException(arguments)
//// Codes.DataTriggerConditionError -> DataTriggerConditionException(arguments)
//// Codes.DataTriggerExecutionError -> DataTriggerExecutionException(arguments)
//// Codes.DataTriggerInvalidResultError -> DataTriggerInvalidResultException(arguments)
// Codes.DocumentAlreadyPresentError -> DocumentAlreadyPresentException(arguments)
//// Codes.DocumentNotFoundError -> DocumentNotFoundException(arguments)
//// Codes.DocumentOwnerIdMismatchError -> DocumentOwnerIdMismatchException(arguments)
//// Codes.DocumentTimestampsMismatchError -> DocumentTimestampsMismatchException(arguments)
//// Codes.DocumentTimestampWindowViolationError -> DocumentTimestampWindowViolationException(arguments)
//// Codes.DuplicateUniqueIndexError -> DuplicateUniqueIndexException(arguments)
// Codes.InvalidDocumentRevisionError -> InvalidDocumentRevisionException(arguments)
// Codes.IdentityAlreadyExistsError -> IdentityAlreadyExistsException(arguments)
// else -> UnknownConcensusError(code.code, arguments)
// }
}

val arguments = arrayListOf<Any>()
Expand Down

0 comments on commit 948e127

Please sign in to comment.