Fix Cordapp docs which don't use the right gradle syntax. Minor tweaks in AbstractNode

This commit is contained in:
Mike Hearn 2016-11-08 15:26:30 +01:00
parent c0e08bee60
commit 686b53f768
2 changed files with 13 additions and 15 deletions

View File

@ -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
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.
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;
@ -211,28 +211,27 @@ is a three node example;
name "Controller"
dirName "controller"
nearestCity "London"
notary true // Sets this node to be a notary
advertisedServices []
artemisPort 10002
webPort 10003
advertisedServices = [ "corda.notary.validating" ]
artemisPort 12345
webPort 12346
cordapps []
}
node {
name "NodeA"
dirName "nodea"
nearestCity "London"
advertisedServices []
artemisPort 10004
webPort 10005
advertisedServices = []
artemisPort 31337
webPort 31339
cordapps []
}
node {
name "NodeB"
dirName "nodeb"
nearestCity "New York"
advertisedServices []
artemisPort 10006
webPort 10007
advertisedServices = []
artemisPort 31338
webPort 31340
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.
Other cordapps can also be specified if they are already specified as classpath or compile dependencies in your
build.gradle.
``build.gradle``.

View File

@ -17,7 +17,6 @@ import com.r3corda.core.serialization.SingletonSerializeAsToken
import com.r3corda.core.serialization.deserialize
import com.r3corda.core.serialization.serialize
import com.r3corda.core.transactions.SignedTransaction
import com.r3corda.core.utilities.debug
import com.r3corda.node.api.APIServer
import com.r3corda.node.services.api.*
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<*>) {
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
}
@ -192,7 +191,7 @@ abstract class AbstractNode(open val configuration: NodeConfiguration, val netwo
log.info("Node starting up ...")
// Do all of this in a database transaction so anything that might need a connection has one.
initialiseDatabasePersistence() {
initialiseDatabasePersistence {
val storageServices = initialiseStorageService(configuration.basedir)
storage = storageServices.first
checkpointStorage = storageServices.second