Reputation: 144
In one test, I got Input state requires notary "C=GB,L=London,O=Mock Company 1" which does not match the transaction notary "C=GB,L=London,O=Mock Company 1,CN=corda.notary.validating".
They should be the same one. The only difference is CN which is optional.
How can I avoid the error?
\Sean
Upvotes: 0
Views: 81
Reputation: 23140
How are you getting the notary? Each node has a main identity, as well as an optional notary identity. Is it possible that you're retrieving the former, rather than the latter?
To get the notary, you should be using NetworkMapCache.getNotary
, which takes a CordaX500Name and only searches for notary identities with this name.
Upvotes: 0