问题描述
如果我在legalName中使用commonName创建节点(至少对于MockNetwork),则networkMapCache.getNodeByLegalName(legalName)返回null.删除commonName后,它可以工作.是设计使然吗?
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?
推荐答案
这是Corda V1.0中的错误.创建节点时,名称的通用名称
部分将被清空.但是,在使用网络图查找节点时,通用名称
字段不会被清空,因此找不到匹配项.
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.
当用通用名称创建常规节点时,Corda团队将向后移植对Corda V1.0的修复,以引发异常.在Corda V1.0中,公证群集仅使用一个通用名称来相互识别.
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.
在Corda的未来版本中,Corda团队将研究为常规节点重新启用通用名
字段.
In a future version of Corda, the Corda team will examine re-enabling the common name
field for regular nodes.
这篇关于v1.0-建立节点的legalName中的commonName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!