How to configure notary node while running cordapp via IntelliJ

一个人想着一个人 提交于 2019-12-11 10:58:02

问题


I want to configure the notary node , for example as non validating. How do I configure it in the cordapp example,NodeDriver.kt file?

I could see the option in build gradle file and run via terminal, but I am specifically looking to run via intellij.


回答1:


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.
    }
}


来源:https://stackoverflow.com/questions/53170414/how-to-configure-notary-node-while-running-cordapp-via-intellij

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!