mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
ENT-11004 Store Ledger Recovery records only if the transaction was locally stored in the first place. (#7544)
This commit is contained in:
parent
be433c1fd0
commit
be515abd08
@ -90,7 +90,7 @@ open class SendTransactionFlow(val stx: SignedTransaction,
|
||||
val DUMMY_PARTICIPANT_NAME = CordaX500Name("Transaction Participant", "London", "GB")
|
||||
|
||||
fun makeMetaData(stx: SignedTransaction, recordMetaDataEvenIfNotFullySigned: Boolean, senderStatesToRecord: StatesToRecord, participantSessions: Set<FlowSession>, observerSessions: Set<FlowSession>): TransactionMetadata? {
|
||||
return if (recordMetaDataEvenIfNotFullySigned || isFullySigned(stx))
|
||||
return if (recordMetaDataEvenIfNotFullySigned || isFullySignedAndStoredLocally(stx))
|
||||
TransactionMetadata(DUMMY_PARTICIPANT_NAME,
|
||||
SenderDistributionList(senderStatesToRecord,
|
||||
(participantSessions.map { it.counterparty.name to StatesToRecord.ONLY_RELEVANT }).toMap() +
|
||||
@ -104,6 +104,9 @@ open class SendTransactionFlow(val stx: SignedTransaction,
|
||||
stx.resolveTransactionWithSignatures(serviceHub).getMissingSigners().isEmpty()
|
||||
else false
|
||||
}
|
||||
|
||||
private fun isFullySignedAndStoredLocally(stx: SignedTransaction) = isFullySigned(stx)
|
||||
&& (currentTopLevel?.serviceHub?.validatedTransactions?.getTransaction(stx.id) != null)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user