From 8dd9dee9c444f5a8634c43b90571b82ccf1faf55 Mon Sep 17 00:00:00 2001 From: Agnieszka Szczepanska <58401935+aga-szczepanska@users.noreply.github.com> Date: Wed, 14 Apr 2021 09:30:53 +0200 Subject: [PATCH] NOTICK - make recordDependencies suspendable (#6896) * add suspendable annotation to recordDependencies * add suspendable annotation to recordDependencies implementation --- .../kotlin/net/corda/core/internal/ServiceHubCoreInternal.kt | 1 + .../kotlin/net/corda/node/services/DbTransactionsResolver.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/core/src/main/kotlin/net/corda/core/internal/ServiceHubCoreInternal.kt b/core/src/main/kotlin/net/corda/core/internal/ServiceHubCoreInternal.kt index e0e0cccf72..f8a4c4f925 100644 --- a/core/src/main/kotlin/net/corda/core/internal/ServiceHubCoreInternal.kt +++ b/core/src/main/kotlin/net/corda/core/internal/ServiceHubCoreInternal.kt @@ -24,5 +24,6 @@ interface TransactionsResolver { @Suspendable fun downloadDependencies(batchMode: Boolean) + @Suspendable fun recordDependencies(usedStatesToRecord: StatesToRecord) } \ No newline at end of file diff --git a/node/src/main/kotlin/net/corda/node/services/DbTransactionsResolver.kt b/node/src/main/kotlin/net/corda/node/services/DbTransactionsResolver.kt index 28ec4ed962..bc6cf3d2af 100644 --- a/node/src/main/kotlin/net/corda/node/services/DbTransactionsResolver.kt +++ b/node/src/main/kotlin/net/corda/node/services/DbTransactionsResolver.kt @@ -94,6 +94,7 @@ class DbTransactionsResolver(private val flow: ResolveTransactionsFlow) : Transa logger.debug { "Downloaded ${sortedDependencies?.size} dependencies from remote peer for transactions ${flow.txHashes}" } } + @Suspendable override fun recordDependencies(usedStatesToRecord: StatesToRecord) { val sortedDependencies = checkNotNull(this.sortedDependencies) logger.trace { "Recording ${sortedDependencies.size} dependencies for ${flow.txHashes.size} transactions" }