问题
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