diff --git a/core/src/main/kotlin/net/corda/core/flows/FinalityFlow.kt b/core/src/main/kotlin/net/corda/core/flows/FinalityFlow.kt index c44654caad..932d2a01f4 100644 --- a/core/src/main/kotlin/net/corda/core/flows/FinalityFlow.kt +++ b/core/src/main/kotlin/net/corda/core/flows/FinalityFlow.kt @@ -231,6 +231,7 @@ class FinalityFlow private constructor(val transaction: SignedTransaction, serviceHub.telemetryServiceInternal.span("${this::class.java.name}#recordLocallyAndBroadcast", flowLogic = this) { recordUnnotarisedTransaction(tx) logger.info("Recorded transaction without notary signature locally.") + if (sessions.isEmpty()) return progressTracker.currentStep = BROADCASTING_PRE_NOTARISATION sessions.forEach { session -> try { diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt index a9651af587..d9149e1f34 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt @@ -305,8 +305,6 @@ class DBTransactionStorage(private val database: CordaPersistence, cacheFactory: val update = session.createQuery(criteriaUpdate) val rowsUpdated = update.executeUpdate() if (rowsUpdated == 0) { - // indicates race condition whereby ReceiverFinality MISSING_NOTARY_SIG overwritten to UNVERIFIED by ResolveTransactionsFlow (in follow-up txn) - // TO-DO: ensure unverified txn signatures are validated prior to recording (https://r3-cev.atlassian.net/browse/ENT-9566) val criteriaUpdateUnverified = criteriaBuilder.createCriteriaUpdate(DBTransaction::class.java) val updateRootUnverified = criteriaUpdateUnverified.from(DBTransaction::class.java) criteriaUpdateUnverified.set(updateRootUnverified.get(DBTransaction::signatures.name), signatures.serialize(context = contextToUse().withEncoding(SNAPPY)).bytes) @@ -342,7 +340,6 @@ class DBTransactionStorage(private val database: CordaPersistence, cacheFactory: val cacheValue = TxCacheValue(transaction, status = TransactionStatus.UNVERIFIED) val added = addWithDuplicatesAllowed(transaction.id, cacheValue) { k, v, existingEntry -> if (existingEntry.status == TransactionStatus.MISSING_NOTARY_SIG) { - // TODO verify signatures on passed in transaction include notary (See https://r3-cev.atlassian.net/browse/ENT-9566)) session.merge(toPersistentEntity(k, v)) true } else false