mirror of
https://github.com/corda/corda.git
synced 2025-06-23 01:19:00 +00:00
Merged in andrius-cleanup-tweaks (pull request #208)
Remove the "verify correct notary has signed" check from TwoParty protocols
This commit is contained in:
@ -224,7 +224,6 @@ object TwoPartyDealProtocol {
|
||||
|
||||
logger.trace { "Got signatures from other party, verifying ... " }
|
||||
|
||||
verifyCorrectNotary(stx.tx, signatures.notarySig)
|
||||
val fullySigned = stx + signatures.sellerSig + signatures.notarySig
|
||||
fullySigned.verify()
|
||||
|
||||
@ -269,12 +268,6 @@ object TwoPartyDealProtocol {
|
||||
return ptx.toSignedTransaction(checkSufficientSignatures = false)
|
||||
}
|
||||
|
||||
private fun verifyCorrectNotary(wtx: WireTransaction, sig: DigitalSignature.LegallyIdentifiable) {
|
||||
if (wtx.inputs.isEmpty()) return // Can choose any Notary if there are no inputs
|
||||
val notary = serviceHub.loadState(wtx.inputs.first()).notary
|
||||
check(sig.signer == notary) { "Transaction not signed by the required Notary" }
|
||||
}
|
||||
|
||||
@Suspendable protected abstract fun validateHandshake(handshake: Handshake<U>): Handshake<U>
|
||||
@Suspendable protected abstract fun assembleSharedTX(handshake: Handshake<U>): Pair<TransactionBuilder, List<PublicKey>>
|
||||
}
|
||||
|
Reference in New Issue
Block a user