diff --git a/constants.properties b/constants.properties index 3c240a7676..4f0c0e1db8 100644 --- a/constants.properties +++ b/constants.properties @@ -29,7 +29,7 @@ snakeYamlVersion=1.19 caffeineVersion=2.7.0 metricsVersion=4.1.0 metricsNewRelicVersion=1.1.1 -djvmVersion=1.0-RC02 +djvmVersion=1.0-RC03 openSourceBranch=https://github.com/corda/corda/blob/release/os/4.4 openSourceSamplesBranch=https://github.com/corda/samples/blob/release-V4 jolokiaAgentVersion=1.6.1 diff --git a/node/src/main/kotlin/net/corda/node/internal/djvm/DeterministicVerifier.kt b/node/src/main/kotlin/net/corda/node/internal/djvm/DeterministicVerifier.kt index de42d36471..10c0712237 100644 --- a/node/src/main/kotlin/net/corda/node/internal/djvm/DeterministicVerifier.kt +++ b/node/src/main/kotlin/net/corda/node/internal/djvm/DeterministicVerifier.kt @@ -19,6 +19,7 @@ import net.corda.djvm.messages.Message import net.corda.djvm.rewiring.SandboxClassLoader import net.corda.djvm.source.ClassSource import net.corda.node.djvm.LtxFactory +import java.util.function.Function class DeterministicVerifier( ltx: LedgerTransaction, @@ -27,7 +28,7 @@ class DeterministicVerifier( ) : Verifier(ltx, transactionClassLoader) { override fun verifyContracts() { - val result = IsolatedTask(ltx.id.toString(), sandboxConfiguration).run { + val result = IsolatedTask(ltx.id.toString(), sandboxConfiguration).run(Function { classLoader -> (classLoader.parent as? SandboxClassLoader)?.apply { /** * We don't need to add either Java APIs or Corda's own classes @@ -92,7 +93,7 @@ class DeterministicVerifier( // Now execute the contract verifier task within the sandbox... verifier.apply(sandboxTx) - } + }) with (result.costs) { logger.info("Verify {} complete: allocations={}, invocations={}, jumps={}, throws={}", diff --git a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt index 9267183820..5f66e1da97 100644 --- a/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt +++ b/serialization-djvm/src/test/kotlin/net/corda/serialization/djvm/TestBase.kt @@ -102,9 +102,9 @@ abstract class TestBase(type: SandboxType) { it.setMinimumSeverityLevel(minimumSeverityLevel) it.setSandboxOnlyAnnotations(sandboxOnlyAnnotations) it.setVisibleAnnotations(visibleAnnotations) - })).use { - action(this) - } + })).use(Consumer { ctx -> + ctx.action() + }) } }.apply { uncaughtExceptionHandler = Thread.UncaughtExceptionHandler { _, ex ->