From 76eb713777215f31b626c0ed8cd8a20dd857597b Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Wed, 1 Feb 2017 17:31:32 +0000 Subject: [PATCH] Added a h2 port configuration to Cordformation. --- docs/source/creating-a-cordapp.rst | 3 +++ .../src/main/groovy/net/corda/plugins/Node.groovy | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/docs/source/creating-a-cordapp.rst b/docs/source/creating-a-cordapp.rst index 98d551d1d5..f8d5930bf8 100644 --- a/docs/source/creating-a-cordapp.rst +++ b/docs/source/creating-a-cordapp.rst @@ -202,6 +202,7 @@ is a three node example; p2pPort 10002 rpcPort 10003 webPort 10004 + h2port 11002 cordapps [] } node { @@ -211,6 +212,7 @@ is a three node example; p2pPort 10005 rpcPort 10006 webPort 10007 + h2port 11005 cordapps [] } node { @@ -220,6 +222,7 @@ is a three node example; p2pPort 10008 rpcPort 10009 webPort 10010 + h2port 11008 cordapps [] } } diff --git a/gradle-plugins/cordformation/src/main/groovy/net/corda/plugins/Node.groovy b/gradle-plugins/cordformation/src/main/groovy/net/corda/plugins/Node.groovy index a4d9a22976..2e2d9dfe89 100644 --- a/gradle-plugins/cordformation/src/main/groovy/net/corda/plugins/Node.groovy +++ b/gradle-plugins/cordformation/src/main/groovy/net/corda/plugins/Node.groovy @@ -75,6 +75,13 @@ class Node { config = config.withValue("useHTTPS", ConfigValueFactory.fromAnyRef(isHttps)) } + /** + * Sets the H2 port for this node + */ + void h2port(Integer h2port) { + config = config.withValue("h2port", ConfigValueFactory.fromAnyRef(h2port)) + } + void useTestClock(Boolean useTestClock) { config = config.withValue("useTestClock", ConfigValueFactory.fromAnyRef(useTestClock)) }