mirror of
https://github.com/corda/corda.git
synced 2025-03-15 00:36:49 +00:00
Merge commit '20cd4539d637676ac55457fc7fe4df2ce8dacff8' into anthony-os-merge-20180906
# Conflicts: # node/capsule/build.gradle
This commit is contained in:
commit
230d91046c
@ -478,6 +478,6 @@ if (file('corda-docs-only-build').exists() || (System.getenv('CORDA_DOCS_ONLY_BU
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "4.8.1"
|
||||
gradleVersion = "4.10"
|
||||
distributionType = Wrapper.DistributionType.ALL
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import net.corda.core.utilities.days
|
||||
import net.corda.core.utilities.minutes
|
||||
import net.corda.core.utilities.seconds
|
||||
import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcConnectorTcpTransport
|
||||
import net.corda.nodeapi.internal.PLATFORM_VERSION
|
||||
import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT
|
||||
import java.time.Duration
|
||||
|
||||
@ -45,7 +46,7 @@ open class CordaRPCClientConfiguration @JvmOverloads constructor(
|
||||
* The default value is whatever version of Corda this RPC library was shipped as a part of. Therefore if you
|
||||
* use the RPC library from Corda 4, it will by default only connect to a node of version 4 or above.
|
||||
*/
|
||||
open val minimumServerProtocolVersion: Int = 4,
|
||||
open val minimumServerProtocolVersion: Int = PLATFORM_VERSION,
|
||||
|
||||
/**
|
||||
* If set to true the client will track RPC call sites (default is false). If an error occurs subsequently
|
||||
|
@ -438,7 +438,7 @@ fun CordaRPCOps.pendingFlowsCount(): DataFeed<Int, Pair<Int, Int>> {
|
||||
}
|
||||
}
|
||||
}.subscribe()
|
||||
if (completedFlowsCount == 0) {
|
||||
if (pendingFlowsCount == 0) {
|
||||
updates.onCompleted()
|
||||
}
|
||||
return DataFeed(pendingFlowsCount, updates)
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1,4 +1,5 @@
|
||||
package net.corda.nodeapi.internal
|
||||
|
||||
// TODO: Add to Corda node.conf to allow customisation
|
||||
const val NODE_INFO_DIRECTORY = "additional-node-infos"
|
||||
const val NODE_INFO_DIRECTORY = "additional-node-infos"
|
||||
const val PLATFORM_VERSION = 4
|
||||
|
@ -9,7 +9,7 @@ apply plugin: 'com.jfrog.artifactory'
|
||||
description 'Corda Enterprise'
|
||||
|
||||
configurations {
|
||||
runtimeArtifacts.extendsFrom runtime
|
||||
runtimeArtifacts.extendsFrom runtimeClasspath
|
||||
capsuleRuntime
|
||||
}
|
||||
|
||||
@ -31,18 +31,20 @@ ext {
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
jar.enabled = false
|
||||
|
||||
task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
|
||||
archiveName "corda-enterprise-${corda_release_version}.jar"
|
||||
applicationClass 'net.corda.node.Corda'
|
||||
archiveName "corda-enterprise-${corda_release_version}.jar"
|
||||
applicationSource = files(
|
||||
project(':node').configurations.runtime,
|
||||
project(':node').jar,
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
||||
"$rootDir/config/dev/log4j2.xml",
|
||||
"$rootDir/node/build/resources/main/reference.conf"
|
||||
project(':node').configurations.runtimeClasspath,
|
||||
project(':node').tasks.jar,
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
||||
project(':node').buildDir.toString() + '/resources/main/reference.conf',
|
||||
"$rootDir/config/dev/log4j2.xml",
|
||||
'NOTICE' // Copy CDDL notice
|
||||
)
|
||||
from 'NOTICE' // Copy CDDL notice
|
||||
from configurations.capsuleRuntime.files.collect { zipTree(it) }
|
||||
|
||||
capsuleManifest {
|
||||
@ -65,12 +67,12 @@ task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn buildCordaJAR
|
||||
assemble.dependsOn buildCordaJAR
|
||||
|
||||
artifacts {
|
||||
runtimeArtifacts buildCordaJAR
|
||||
publish buildCordaJAR {
|
||||
classifier ""
|
||||
classifier ''
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,6 @@ open class Node(configuration: NodeConfiguration,
|
||||
ArtemisRpcBroker.withoutSsl(configuration.p2pSslOptions, this.address, adminAddress, securityManager, MAX_RPC_MESSAGE_SIZE, jmxMonitoringHttpPort != null, rpcBrokerDirectory, shouldStartLocalShell())
|
||||
}
|
||||
}
|
||||
rpcBroker!!.closeOnStop()
|
||||
rpcBroker!!.addresses
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import net.corda.node.utilities.registration.NodeRegistrationException
|
||||
import net.corda.node.utilities.registration.NodeRegistrationHelper
|
||||
import net.corda.node.utilities.saveToKeyStore
|
||||
import net.corda.node.utilities.saveToTrustStore
|
||||
import net.corda.nodeapi.internal.PLATFORM_VERSION
|
||||
import net.corda.nodeapi.internal.addShutdownHook
|
||||
import net.corda.nodeapi.internal.config.UnknownConfigurationKeysException
|
||||
import net.corda.nodeapi.internal.persistence.CouldNotCreateDataSourceException
|
||||
@ -416,7 +417,7 @@ open class NodeStartup: CordaCliWrapper("corda", "Runs a Corda Node") {
|
||||
|
||||
protected open fun getVersionInfo(): VersionInfo {
|
||||
return VersionInfo(
|
||||
CordaVersionProvider.platformVersion,
|
||||
PLATFORM_VERSION,
|
||||
CordaVersionProvider.releaseVersion,
|
||||
CordaVersionProvider.revision,
|
||||
CordaVersionProvider.vendor
|
||||
|
@ -319,12 +319,9 @@ class P2PMessagingClient(val config: NodeConfiguration,
|
||||
return
|
||||
}
|
||||
eventsSubscription = p2pConsumer!!.messages
|
||||
.doOnError { error -> throw error }
|
||||
.doOnNext { message -> deliver(message) }
|
||||
// this `run()` method is semantically meant to block until the message consumption runs, hence the latch here
|
||||
.doOnCompleted(latch::countDown)
|
||||
.doOnError { error -> throw error }
|
||||
.subscribe()
|
||||
.subscribe({ message -> deliver(message) }, { error -> throw error })
|
||||
p2pConsumer!!
|
||||
}
|
||||
consumer.start()
|
||||
|
@ -25,6 +25,7 @@ import net.corda.node.services.Permissions
|
||||
import net.corda.node.services.config.*
|
||||
import net.corda.node.utilities.registration.HTTPNetworkRegistrationService
|
||||
import net.corda.node.utilities.registration.NodeRegistrationHelper
|
||||
import net.corda.nodeapi.internal.PLATFORM_VERSION
|
||||
import net.corda.nodeapi.internal.DevIdentityGenerator
|
||||
import net.corda.nodeapi.internal.SignedNodeInfo
|
||||
import net.corda.nodeapi.internal.addShutdownHook
|
||||
@ -296,7 +297,7 @@ class DriverDSLImpl(
|
||||
"devMode" to false)
|
||||
)).checkAndOverrideForInMemoryDB()
|
||||
|
||||
val versionInfo = VersionInfo(1, "1", "1", "1")
|
||||
val versionInfo = VersionInfo(PLATFORM_VERSION, "1", "1", "1")
|
||||
config.corda.certificatesDirectory.createDirectories()
|
||||
// Create network root truststore.
|
||||
val rootTruststorePath = config.corda.certificatesDirectory / "network-root-truststore.jks"
|
||||
@ -920,7 +921,7 @@ class NetworkVisibilityController {
|
||||
val (snapshot, updates) = rpc.networkMapFeed()
|
||||
visibleNodeCount = snapshot.size
|
||||
checkIfAllVisible()
|
||||
subscription = updates.subscribe {
|
||||
subscription = updates.subscribe({
|
||||
when (it) {
|
||||
is NetworkMapCache.MapChange.Added -> {
|
||||
visibleNodeCount++
|
||||
@ -934,7 +935,9 @@ class NetworkVisibilityController {
|
||||
// Nothing to do here but better being exhaustive.
|
||||
}
|
||||
}
|
||||
}
|
||||
}, { _ ->
|
||||
// Nothing to do on errors here.
|
||||
})
|
||||
return future
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ apply plugin: 'com.jfrog.artifactory'
|
||||
description 'Node Explorer'
|
||||
|
||||
configurations {
|
||||
runtimeArtifacts.extendsFrom runtime
|
||||
runtimeArtifacts.extendsFrom runtimeClasspath
|
||||
}
|
||||
|
||||
// Force the Caplet to target Java 6. This ensures that running 'java -jar explorer.jar' on any Java 6 VM upwards
|
||||
@ -19,12 +19,12 @@ configurations {
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
task buildExplorerJAR(type: FatCapsule, dependsOn: project(':tools:explorer').compileJava) {
|
||||
task buildExplorerJAR(type: FatCapsule, dependsOn: project(':tools:explorer').tasks.jar) {
|
||||
applicationClass 'net.corda.explorer.Main'
|
||||
archiveName "node-explorer-${corda_release_version}.jar"
|
||||
applicationSource = files(
|
||||
project(':tools:explorer').configurations.runtime,
|
||||
project(':tools:explorer').jar,
|
||||
project(':tools:explorer').configurations.runtimeClasspath,
|
||||
project(':tools:explorer').tasks.jar,
|
||||
project(':tools:explorer').sourceSets.main.java.outputDir.toString() + '/ExplorerCaplet.class'
|
||||
)
|
||||
classifier 'fat'
|
||||
@ -54,6 +54,7 @@ artifacts {
|
||||
|
||||
jar {
|
||||
classifier "ignore"
|
||||
enabled = false
|
||||
}
|
||||
|
||||
publish {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* This build.gradle exists to publish our capsule (executable fat jar) to maven. It cannot be placed in the
|
||||
* node project because the bintray plugin cannot publish two modules from one project.
|
||||
* webserver project because the bintray plugin cannot publish two modules from one project.
|
||||
*/
|
||||
apply plugin: 'net.corda.plugins.publish-utils'
|
||||
apply plugin: 'us.kirchmeier.capsule'
|
||||
@ -26,18 +26,20 @@ dependencies {
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').compileJava) {
|
||||
jar.enabled = false
|
||||
|
||||
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
|
||||
applicationClass 'net.corda.webserver.WebServer'
|
||||
archiveName "corda-webserver-${corda_release_version}.jar"
|
||||
applicationSource = files(
|
||||
project(':webserver').configurations.runtime,
|
||||
project(':webserver').jar,
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
||||
"$rootDir/config/dev/log4j2.xml",
|
||||
"$rootDir/node/build/resources/main/reference.conf"
|
||||
project(':webserver').configurations.runtimeClasspath,
|
||||
project(':webserver').tasks.jar,
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
||||
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
||||
project(':node').buildDir.toString() + '/resources/main/reference.conf',
|
||||
"$rootDir/config/dev/log4j2.xml",
|
||||
project(':node:capsule').projectDir.toString() + '/NOTICE' // Copy CDDL notice
|
||||
)
|
||||
from 'NOTICE' // Copy CDDL notice
|
||||
from configurations.capsuleRuntime.files.collect { zipTree(it) }
|
||||
|
||||
capsuleManifest {
|
||||
@ -57,10 +59,12 @@ task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').compileJava
|
||||
}
|
||||
}
|
||||
|
||||
assemble.dependsOn buildWebserverJar
|
||||
|
||||
artifacts {
|
||||
runtimeArtifacts buildWebserverJar
|
||||
publish buildWebserverJar {
|
||||
classifier ""
|
||||
classifier ''
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user