mirror of
https://github.com/corda/corda.git
synced 2025-01-11 15:32:49 +00:00
Fix Cordapp docs which don't use the right gradle syntax. Minor tweaks in AbstractNode
This commit is contained in:
parent
c0e08bee60
commit
686b53f768
@ -197,7 +197,7 @@ Cordformation is the local node deployment system for Cordapps, the nodes genera
|
|||||||
experimenting, debugging, and testing node configurations and setups but not intended for production or testnet
|
experimenting, debugging, and testing node configurations and setups but not intended for production or testnet
|
||||||
deployment.
|
deployment.
|
||||||
|
|
||||||
To use this gradle plugin you must add a new task that is of the type `com.r3corda.plugins.Cordform` to your
|
To use this gradle plugin you must add a new task that is of the type ``com.r3corda.plugins.Cordform`` to your
|
||||||
build.gradle and then configure the nodes you wish to deploy with the Node and nodes configuration DSL.
|
build.gradle and then configure the nodes you wish to deploy with the Node and nodes configuration DSL.
|
||||||
This DSL is specified in the `JavaDoc <api/index.html>`_. An example of this is in the template-cordapp and below
|
This DSL is specified in the `JavaDoc <api/index.html>`_. An example of this is in the template-cordapp and below
|
||||||
is a three node example;
|
is a three node example;
|
||||||
@ -211,28 +211,27 @@ is a three node example;
|
|||||||
name "Controller"
|
name "Controller"
|
||||||
dirName "controller"
|
dirName "controller"
|
||||||
nearestCity "London"
|
nearestCity "London"
|
||||||
notary true // Sets this node to be a notary
|
advertisedServices = [ "corda.notary.validating" ]
|
||||||
advertisedServices []
|
artemisPort 12345
|
||||||
artemisPort 10002
|
webPort 12346
|
||||||
webPort 10003
|
|
||||||
cordapps []
|
cordapps []
|
||||||
}
|
}
|
||||||
node {
|
node {
|
||||||
name "NodeA"
|
name "NodeA"
|
||||||
dirName "nodea"
|
dirName "nodea"
|
||||||
nearestCity "London"
|
nearestCity "London"
|
||||||
advertisedServices []
|
advertisedServices = []
|
||||||
artemisPort 10004
|
artemisPort 31337
|
||||||
webPort 10005
|
webPort 31339
|
||||||
cordapps []
|
cordapps []
|
||||||
}
|
}
|
||||||
node {
|
node {
|
||||||
name "NodeB"
|
name "NodeB"
|
||||||
dirName "nodeb"
|
dirName "nodeb"
|
||||||
nearestCity "New York"
|
nearestCity "New York"
|
||||||
advertisedServices []
|
advertisedServices = []
|
||||||
artemisPort 10006
|
artemisPort 31338
|
||||||
webPort 10007
|
webPort 31340
|
||||||
cordapps []
|
cordapps []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,4 +243,4 @@ run this task it will install the nodes to the directory specified and a script
|
|||||||
at present) to run the nodes with one command.
|
at present) to run the nodes with one command.
|
||||||
|
|
||||||
Other cordapps can also be specified if they are already specified as classpath or compile dependencies in your
|
Other cordapps can also be specified if they are already specified as classpath or compile dependencies in your
|
||||||
build.gradle.
|
``build.gradle``.
|
||||||
|
@ -17,7 +17,6 @@ import com.r3corda.core.serialization.SingletonSerializeAsToken
|
|||||||
import com.r3corda.core.serialization.deserialize
|
import com.r3corda.core.serialization.deserialize
|
||||||
import com.r3corda.core.serialization.serialize
|
import com.r3corda.core.serialization.serialize
|
||||||
import com.r3corda.core.transactions.SignedTransaction
|
import com.r3corda.core.transactions.SignedTransaction
|
||||||
import com.r3corda.core.utilities.debug
|
|
||||||
import com.r3corda.node.api.APIServer
|
import com.r3corda.node.api.APIServer
|
||||||
import com.r3corda.node.services.api.*
|
import com.r3corda.node.services.api.*
|
||||||
import com.r3corda.node.services.config.NodeConfiguration
|
import com.r3corda.node.services.config.NodeConfiguration
|
||||||
@ -113,7 +112,7 @@ abstract class AbstractNode(open val configuration: NodeConfiguration, val netwo
|
|||||||
|
|
||||||
override fun registerProtocolInitiator(markerClass: KClass<*>, protocolFactory: (Party) -> ProtocolLogic<*>) {
|
override fun registerProtocolInitiator(markerClass: KClass<*>, protocolFactory: (Party) -> ProtocolLogic<*>) {
|
||||||
require(markerClass !in protocolFactories) { "${markerClass.java.name} has already been used to register a protocol" }
|
require(markerClass !in protocolFactories) { "${markerClass.java.name} has already been used to register a protocol" }
|
||||||
log.debug { "Registering ${markerClass.java.name}" }
|
log.info("Registering protocol ${markerClass.java.name}")
|
||||||
protocolFactories[markerClass.java] = protocolFactory
|
protocolFactories[markerClass.java] = protocolFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +191,7 @@ abstract class AbstractNode(open val configuration: NodeConfiguration, val netwo
|
|||||||
log.info("Node starting up ...")
|
log.info("Node starting up ...")
|
||||||
|
|
||||||
// Do all of this in a database transaction so anything that might need a connection has one.
|
// Do all of this in a database transaction so anything that might need a connection has one.
|
||||||
initialiseDatabasePersistence() {
|
initialiseDatabasePersistence {
|
||||||
val storageServices = initialiseStorageService(configuration.basedir)
|
val storageServices = initialiseStorageService(configuration.basedir)
|
||||||
storage = storageServices.first
|
storage = storageServices.first
|
||||||
checkpointStorage = storageServices.second
|
checkpointStorage = storageServices.second
|
||||||
|
Loading…
Reference in New Issue
Block a user