mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
Fwd-merge from OS 4.9
This commit is contained in:
commit
2f53e8115f
@ -464,6 +464,9 @@ allprojects {
|
||||
details.useVersion commons_text_version
|
||||
}
|
||||
}
|
||||
if (details.requested.group == 'org.yaml' && details.requested.name == 'snakeyaml') {
|
||||
details.useVersion snake_yaml_version
|
||||
}
|
||||
}
|
||||
|
||||
dependencySubstitution {
|
||||
|
@ -30,6 +30,7 @@ disruptorVersion=3.4.2
|
||||
typesafeConfigVersion=1.3.4
|
||||
jsr305Version=3.0.2
|
||||
artifactoryPluginVersion=4.16.1
|
||||
snakeYamlVersion=1.33
|
||||
caffeineVersion=2.9.3
|
||||
metricsVersion=4.1.0
|
||||
metricsNewRelicVersion=1.1.1
|
||||
|
@ -8,6 +8,7 @@ import net.corda.core.flows.*
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.internal.concurrent.transpose
|
||||
import net.corda.core.messaging.startFlow
|
||||
import net.corda.core.node.services.StatesNotAvailableException
|
||||
import net.corda.core.node.services.queryBy
|
||||
import net.corda.core.node.services.vault.QueryCriteria
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
@ -70,7 +71,11 @@ class ScheduledFlowIntegrationTests {
|
||||
val state = results.states.firstOrNull() ?: return
|
||||
require(!state.state.data.processed) { "Cannot spend an already processed state" }
|
||||
val lock = UUID.randomUUID()
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
try {
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
} catch (e: StatesNotAvailableException) {
|
||||
return
|
||||
}
|
||||
val notary = state.state.notary
|
||||
val outputState = SpentState(identity, ourIdentity, state.state.data.destination)
|
||||
val builder = TransactionBuilder(notary)
|
||||
|
@ -4,6 +4,7 @@ import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.flows.*
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.node.services.StatesNotAvailableException
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
import net.corda.core.utilities.NonEmptySet
|
||||
import net.corda.testing.contracts.DummyContract
|
||||
@ -25,7 +26,11 @@ class ScheduledFlow(private val stateRef: StateRef) : FlowLogic<Unit>() {
|
||||
}
|
||||
require(!scheduledState.processed) { "State should not have been previously processed" }
|
||||
val lock = UUID.randomUUID()
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
try {
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
} catch (e: StatesNotAvailableException) {
|
||||
return
|
||||
}
|
||||
val notary = state.state.notary
|
||||
val newStateOutput = scheduledState.copy(processed = true)
|
||||
val builder = TransactionBuilder(notary)
|
||||
|
@ -81,10 +81,10 @@ include 'tools:checkpoint-agent'
|
||||
include 'samples:attachment-demo:contracts'
|
||||
include 'samples:attachment-demo:workflows'
|
||||
include 'samples:trader-demo:workflows-trader'
|
||||
include 'samples:irs-demo'
|
||||
include 'samples:irs-demo:cordapp:contracts-irs'
|
||||
include 'samples:irs-demo:cordapp:workflows-irs'
|
||||
include 'samples:irs-demo:web'
|
||||
// include 'samples:irs-demo'
|
||||
// include 'samples:irs-demo:cordapp:contracts-irs'
|
||||
// include 'samples:irs-demo:cordapp:workflows-irs'
|
||||
// include 'samples:irs-demo:web'
|
||||
include 'samples:simm-valuation-demo'
|
||||
include 'samples:simm-valuation-demo:flows'
|
||||
include 'samples:simm-valuation-demo:contracts-states'
|
||||
|
Loading…
Reference in New Issue
Block a user