verify

fun verify()

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.

If receiving SignedTransactions over the wire from other nodes, then it is recommended the verification be done via SignedTransaction.verify directly rather than via SignedTransaction.toLedgerTransaction. If transaction is from a legacy node (4.11 or older) then the later solution will not work.

Throws

if anything goes wrong.