Fix build

This commit is contained in:
Mike Hearn 2016-11-17 16:33:06 +01:00
parent 230302c847
commit f630e15528
11 changed files with 52 additions and 50 deletions

39
.idea/modules.xml generated
View File

@ -2,6 +2,10 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_integrationTest.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_main.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/attachment-demo_test.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc_main.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc_main.iml" group="buildSrc" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc_test.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc_test.iml" group="buildSrc" />
@ -30,12 +34,19 @@
<module fileurl="file://$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins.iml" filepath="$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins.iml" group="gradle-plugins" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins_main.iml" filepath="$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins_main.iml" group="gradle-plugins" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins_test.iml" filepath="$PROJECT_DIR$/.idea/modules/gradle-plugins/gradle-plugins_test.iml" group="gradle-plugins" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_integrationTest.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_main.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/irs-demo_test.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/finance/isolated/isolated.iml" filepath="$PROJECT_DIR$/.idea/modules/finance/isolated/isolated.iml" group="finance/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/finance/isolated/isolated_main.iml" filepath="$PROJECT_DIR$/.idea/modules/finance/isolated/isolated_main.iml" group="finance/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/finance/isolated/isolated_test.iml" filepath="$PROJECT_DIR$/.idea/modules/finance/isolated/isolated_test.iml" group="finance/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest.iml" group="tools/loadtest" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest_main.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest_main.iml" group="tools/loadtest" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest_test.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/loadtest/loadtest_test.iml" group="tools/loadtest" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser_main.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/network-visualiser_test.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_integrationTest.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_main.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_main.iml" group="node" />
@ -49,30 +60,22 @@
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" group="r3prototyping" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" group="r3prototyping" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_integrationTest.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_main.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/attachment-demo/samples_attachment-demo_test.iml" group="samples/attachment-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_integrationTest.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_main.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/irs-demo/samples_irs-demo_test.iml" group="samples/irs-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser_main.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/network-visualiser/samples_network-visualiser_test.iml" group="samples/network-visualiser" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo_main.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/samples_simm-valuation-demo_test.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_integrationTest.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_main.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/samples_trader-demo_test.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/samples.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/samples.iml" group="samples" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/samples_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/samples_main.iml" group="samples" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/samples_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/samples_test.iml" group="samples" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo_main.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/simm-valuation-demo/simm-valuation-demo_test.iml" group="samples/simm-valuation-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/test-utils/test-utils.iml" filepath="$PROJECT_DIR$/.idea/modules/test-utils/test-utils.iml" group="test-utils" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/test-utils/test-utils_main.iml" filepath="$PROJECT_DIR$/.idea/modules/test-utils/test-utils_main.iml" group="test-utils" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/test-utils/test-utils_test.iml" filepath="$PROJECT_DIR$/.idea/modules/test-utils/test-utils_test.iml" group="test-utils" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/tools.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/tools.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/tools_main.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/tools_main.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/tools/tools_test.iml" filepath="$PROJECT_DIR$/.idea/modules/tools/tools_test.iml" group="tools" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_integrationTest.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_integrationTest.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_main.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_main.iml" group="samples/trader-demo" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_test.iml" filepath="$PROJECT_DIR$/.idea/modules/samples/trader-demo/trader-demo_test.iml" group="samples/trader-demo" />
</modules>
</component>
</project>

View File

@ -60,11 +60,11 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:core:$corda_version"
compile "net.corda:finance:$corda_version"
compile "net.corda:node:$corda_version"
compile "net.corda:corda:$corda_version"
compile "net.corda:test-utils:$corda_version"
compile project(':core')
compile project(':client')
compile project(':node')
compile project(':finance')
compile project(':test-utils')
// Javax is required for webapis
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"

View File

@ -65,10 +65,10 @@ class InterestRateSwapAPI(val services: ServiceHub) {
@Consumes(MediaType.APPLICATION_JSON)
fun storeDeal(newDeal: InterestRateSwap.State): Response {
try {
services.invokeProtocolAsync(AutoOfferProtocol.Requester::class.java, newDeal).get()
services.invokeProtocolAsync(AutoOfferProtocol.Requester::class.java, newDeal).resultFuture.get()
return Response.created(URI.create(generateDealLink(newDeal))).build()
} catch (ex: Throwable) {
logger.info("Exception when creating deal: ${ex.toString()}")
logger.info("Exception when creating deal: $ex")
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.toString()).build()
}
}
@ -92,7 +92,7 @@ class InterestRateSwapAPI(val services: ServiceHub) {
val priorDemoDate = fetchDemoDate()
// Can only move date forwards
if (newDemoDate.isAfter(priorDemoDate)) {
services.invokeProtocolAsync(UpdateBusinessDayProtocol.Broadcast::class.java, newDemoDate).get()
services.invokeProtocolAsync(UpdateBusinessDayProtocol.Broadcast::class.java, newDemoDate).resultFuture.get()
return Response.ok().build()
}
val msg = "demodate is already $priorDemoDate and can only be updated with a later date"
@ -111,7 +111,7 @@ class InterestRateSwapAPI(val services: ServiceHub) {
@Path("restart")
@Consumes(MediaType.APPLICATION_JSON)
fun exitServer(): Response {
services.invokeProtocolAsync(ExitServerProtocol.Broadcast::class.java, 83).get()
services.invokeProtocolAsync(ExitServerProtocol.Broadcast::class.java, 83).resultFuture.get()
return Response.ok().build()
}
}

View File

@ -126,7 +126,7 @@ class IRSSimulation(networkSendManuallyPumped: Boolean, runAsync: Boolean, laten
showConsensusFor(listOf(node1, node2, regulators[0]))
val instigator = Instigator(node2.info.legalIdentity, AutoOffer(notary.info.notaryIdentity, irs), node1.keyPair!!)
val instigatorTx: ListenableFuture<SignedTransaction> = node1.services.startProtocol(instigator)
val instigatorTx: ListenableFuture<SignedTransaction> = node1.services.startProtocol(instigator).resultFuture
return Futures.allAsList(instigatorTx, acceptorTx).flatMap { instigatorTx }
}

View File

@ -65,7 +65,7 @@ class TradeSimulation(runAsync: Boolean, latencyInjector: InMemoryMessagingNetwo
showConsensusFor(listOf(buyer, seller, notary))
showProgressFor(listOf(buyer, seller))
val sellerFuture = seller.services.startProtocol(sellerProtocol)
val sellerFuture = seller.services.startProtocol(sellerProtocol).resultFuture
return Futures.successfulAsList(buyerFuture, sellerFuture)
}

View File

@ -201,7 +201,7 @@ class NodeInterestRatesTest {
val protocol = RatesFixProtocol(tx, filterFuns, oracle, fixOf, "0.675".bd, "0.1".bd)
LogHelper.setLevel("rates")
net.runNetwork()
val future = n1.services.startProtocol(protocol)
val future = n1.services.startProtocol(protocol).resultFuture
net.runNetwork()
future.get()
// We should now have a valid signature over our tx from the oracle.

View File

@ -33,11 +33,11 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:core:$corda_version"
compile "net.corda:finance:$corda_version"
compile "net.corda:node:$corda_version"
compile "net.corda:corda:$corda_version"
compile "net.corda:test-utils:$corda_version"
compile project(':core')
compile project(':client')
compile project(':node')
compile project(':finance')
compile project(':test-utils')
// Javax is required for webapis
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"

View File

@ -54,11 +54,11 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:core:$corda_version"
compile "net.corda:finance:$corda_version"
compile "net.corda:node:$corda_version"
compile "net.corda:corda:$corda_version"
compile "net.corda:test-utils:$corda_version"
compile project(':core')
compile project(':client')
compile project(':node')
compile project(':finance')
compile project(':test-utils')
// Javax is required for webapis
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"

View File

@ -153,7 +153,7 @@ class PortfolioApi(val services: ServiceHub) {
return withParty(partyName) {
val buyer = if (swap.buySell.isBuy) ownParty else it
val seller = if (swap.buySell.isSell) ownParty else it
services.invokeProtocolAsync(IRSTradeProtocol.Requester::class.java, swap.toData(buyer, seller), it).get()
services.invokeProtocolAsync(IRSTradeProtocol.Requester::class.java, swap.toData(buyer, seller), it).resultFuture.get()
Response.accepted().entity("{}").build()
}
}
@ -268,9 +268,9 @@ class PortfolioApi(val services: ServiceHub) {
return withParty(partyName) { otherParty ->
val existingSwap = getPortfolioWith(otherParty)
if (existingSwap == null) {
services.invokeProtocolAsync(SimmProtocol.Requester::class.java, otherParty, params.valuationDate).get()
services.invokeProtocolAsync(SimmProtocol.Requester::class.java, otherParty, params.valuationDate).resultFuture.get()
} else {
services.invokeProtocolAsync(SimmRevaluation.Initiator::class.java, getPortfolioStateAndRefWith(otherParty).ref, params.valuationDate).get()
services.invokeProtocolAsync(SimmRevaluation.Initiator::class.java, getPortfolioStateAndRefWith(otherParty).ref, params.valuationDate).resultFuture.get()
}
withPortfolio(otherParty) { portfolioState ->

View File

@ -60,12 +60,11 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Corda integration dependencies
compile "net.corda:client:$corda_version"
compile "net.corda:core:$corda_version"
compile "net.corda:finance:$corda_version"
compile "net.corda:node:$corda_version"
compile "net.corda:corda:$corda_version"
compile "net.corda:test-utils:$corda_version"
compile project(':core')
compile project(':client')
compile project(':node')
compile project(':finance')
compile project(':test-utils')
// Javax is required for webapis
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"

View File

@ -56,7 +56,7 @@ class TraderDemoApi(val services: ServiceHub) {
}
// The line below blocks and waits for the future to resolve.
val stx = services.invokeProtocolAsync<SignedTransaction>(SellerProtocol::class.java, otherParty, params.amount.DOLLARS).get()
val stx = services.invokeProtocolAsync<SignedTransaction>(SellerProtocol::class.java, otherParty, params.amount.DOLLARS).resultFuture.get()
logger.info("Sale completed - we have a happy customer!\n\nFinal transaction is:\n\n${Emoji.renderIfSupported(stx.tx)}")
return Response.status(Response.Status.OK).build()
} else {