Merged in andrius-cleanup-tweaks (pull request #208)

Remove the "verify correct notary has signed" check from TwoParty protocols
This commit is contained in:
Andrius Dagys
2016-07-18 10:40:25 +01:00
3 changed files with 1 additions and 18 deletions

View File

@ -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>>
}