mirror of
https://github.com/corda/corda.git
synced 2024-12-25 23:51:10 +00:00
Send a transaction for notarisation only if it has inputs or a timestamp
This commit is contained in:
parent
a19dd55257
commit
36052cbd63
@ -84,7 +84,12 @@ class FinalityFlow(val transactions: Iterable<SignedTransaction>,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun needsNotarySignature(stx: SignedTransaction) = stx.tx.notary != null && hasNoNotarySignature(stx)
|
private fun needsNotarySignature(stx: SignedTransaction): Boolean {
|
||||||
|
val wtx = stx.tx
|
||||||
|
val needsNotarisation = wtx.inputs.isNotEmpty() || wtx.timestamp != null
|
||||||
|
return needsNotarisation && hasNoNotarySignature(stx)
|
||||||
|
|
||||||
|
}
|
||||||
private fun hasNoNotarySignature(stx: SignedTransaction): Boolean {
|
private fun hasNoNotarySignature(stx: SignedTransaction): Boolean {
|
||||||
val notaryKey = stx.tx.notary?.owningKey
|
val notaryKey = stx.tx.notary?.owningKey
|
||||||
val signers = stx.sigs.map { it.by }.toSet()
|
val signers = stx.sigs.map { it.by }.toSet()
|
||||||
|
Loading…
Reference in New Issue
Block a user