kvutils: Don't measure submission interpretation twice. (#5496)

This is already measured in the `run` method above.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Samir Talwar 2020-04-09 09:27:50 +02:00 committed by GitHub
parent 5f412a497a
commit 87d38d8ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,29 +199,24 @@ private[kvutils] class ProcessTransactionSubmission(
value.getContractState.getContractKey -> Conversions.stateKeyToContractId(key) value.getContractState.getContractKey -> Conversions.stateKeyToContractId(key)
} }
val ctx = Metrics.interpretTimer.time() engine
try { .validate(
engine transactionEntry.abs,
.validate( transactionEntry.ledgerEffectiveTime,
transactionEntry.abs, participantId,
transactionEntry.ledgerEffectiveTime, transactionEntry.submissionSeedAndTime,
participantId, )
transactionEntry.submissionSeedAndTime, .consume(
) lookupContract(transactionEntry, inputState),
.consume( lookupPackage(transactionEntry, inputState),
lookupContract(transactionEntry, inputState), lookupKey(transactionEntry, inputState, knownKeys),
lookupPackage(transactionEntry, inputState), )
lookupKey(transactionEntry, inputState, knownKeys), .fold(
) err =>
.fold( reject(
err => recordTime,
reject( buildRejectionLogEntry(transactionEntry, RejectionReason.Disputed(err.msg))),
recordTime, _ => pass)
buildRejectionLogEntry(transactionEntry, RejectionReason.Disputed(err.msg))),
_ => pass)
} finally {
val _ = ctx.stop()
}
} }
/** Validate the submission's conformance to the DAML model */ /** Validate the submission's conformance to the DAML model */