如何通过IntelliJ运行cordapp时配置公证节点 [英] How to configure notary node while running cordapp via IntelliJ
本文介绍了如何通过IntelliJ运行cordapp时配置公证节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将公证节点配置为非验证。我如何在cordapp示例NodeDriver.kt文件中配置它?
I want to configure the notary node , for example as non validating. How do I configure it in the cordapp example,NodeDriver.kt file?
我可以在build gradle文件中看到该选项并通过终端运行,但是我正在寻找
I could see the option in build gradle file and run via terminal, but I am specifically looking to run via intellij.
推荐答案
您需要将自己的公证规范列表传递给驱动程序:
You need to pass your own list of notary specs to the driver:
fun main(args: Array<String>) {
val notaryName = CordaX500Name("MyNotary", "London", "GB")
val notarySpec = NotarySpec(name = notaryName, validating = false)
driver(DriverParameters(notarySpecs = listOf(notarySpec))) {
// Driver logic.
}
}
这篇关于如何通过IntelliJ运行cordapp时配置公证节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文