问题
If I uses a commonName in a legalName to create a node (at least for MockNetwork), then networkMapCache.getNodeByLegalName(legalName) returns null. After removing the commonName, it works. Is that by design?
回答1:
This is a bug in Corda V1.0. When creating a node, the common name
part of the name is nulled out. However, when looking up a node using the network map, the common name
field is not nulled out, so no match is found.
The Corda team will backport a fix to Corda V1.0 to throw an exception when a regular node is created with a common name. In Corda V1.0, a common name is used solely by notary clusters to identify one another.
In a future version of Corda, the Corda team will examine re-enabling the common name
field for regular nodes.
来源:https://stackoverflow.com/questions/46751513/v1-0-commonname-in-a-legalname-to-create-node