corda / net.corda.core.transactions / LedgerTransaction / verify

verify

fun verify(): Unit

Verifies this transaction and runs contract code. At this stage it is assumed that signatures have already been verified.

The contract verification logic is run in a custom classloader created for the current transaction. This classloader is only used during verification and does not leak to the client code.

The reason for this is that classes (contract states) deserialized in this classloader would actually be a different type from what the calling code would expect.

Exceptions

TransactionVerificationException - if anything goes wrong.