mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
ENT-6875 Two Phase Finality - CLEAN-UP (#7321)
* Remove completed TODOs * Prevent mis-leading progress tracker message.
This commit is contained in:
parent
beb0e885fb
commit
b4983597e2
@ -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 {
|
||||
|
@ -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<ByteArray>(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
|
||||
|
Loading…
Reference in New Issue
Block a user