From 686b53f768010431ad6f51f73a2dee591d99b480 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 8 Nov 2016 15:26:30 +0100 Subject: [PATCH] Fix Cordapp docs which don't use the right gradle syntax. Minor tweaks in AbstractNode --- docs/source/creating-a-cordapp.rst | 23 +++++++++---------- .../com/r3corda/node/internal/AbstractNode.kt | 5 ++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/source/creating-a-cordapp.rst b/docs/source/creating-a-cordapp.rst index 4868e16fba..ef347bc690 100644 --- a/docs/source/creating-a-cordapp.rst +++ b/docs/source/creating-a-cordapp.rst @@ -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 `_. 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``. diff --git a/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt index 819314b93e..34cf8f82df 100644 --- a/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt @@ -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