mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
Pass a FilteredTransaction instead of a Signed transaction to a non-validating notary flow to preserve privacy.
This also means that the non-validating notary can service requests on the network without loading any custom plugins.
This commit is contained in:
@ -53,7 +53,7 @@ class RaftNotaryServiceTests : NodeBasedTest() {
|
||||
|
||||
val ex = assertFailsWith(NotaryException::class) { secondSpend.resultFuture.getOrThrow() }
|
||||
val error = ex.error as NotaryError.Conflict
|
||||
assertEquals(error.tx, secondSpendTx.tx)
|
||||
assertEquals(error.txId, secondSpendTx.id)
|
||||
}
|
||||
|
||||
private fun issueState(node: AbstractNode, notary: Party, notaryKey: KeyPair): StateAndRef<*> {
|
||||
|
@ -4,6 +4,7 @@ import net.corda.core.crypto.Party
|
||||
import net.corda.core.node.services.ServiceType
|
||||
import net.corda.core.node.services.TimestampChecker
|
||||
import net.corda.core.node.services.UniquenessProvider
|
||||
import net.corda.flows.NonValidatingNotaryFlow
|
||||
import net.corda.flows.NotaryFlow
|
||||
import net.corda.node.services.api.ServiceHubInternal
|
||||
|
||||
@ -16,6 +17,6 @@ class SimpleNotaryService(services: ServiceHubInternal,
|
||||
}
|
||||
|
||||
override fun createFlow(otherParty: Party): NotaryFlow.Service {
|
||||
return NotaryFlow.Service(otherParty, timestampChecker, uniquenessProvider)
|
||||
return NonValidatingNotaryFlow(otherParty, timestampChecker, uniquenessProvider)
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class NotaryServiceTests {
|
||||
|
||||
val ex = assertFailsWith(NotaryException::class) { future.resultFuture.getOrThrow() }
|
||||
val notaryError = ex.error as NotaryError.Conflict
|
||||
assertEquals(notaryError.tx, stx2.tx)
|
||||
assertEquals(notaryError.txId, stx2.id)
|
||||
notaryError.conflict.verified()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user