mirror of
https://github.com/corda/corda.git
synced 2024-12-26 16:11:12 +00:00
Merge pull request #3876 from corda/thomas/cherry-pick-ENT-2054
Cherry pick ENT-2054
This commit is contained in:
commit
6e1cbd2aa3
@ -48,6 +48,7 @@ open class CashPaymentFlow(
|
|||||||
val anonymousRecipient = txIdentities[recipient] ?: recipient
|
val anonymousRecipient = txIdentities[recipient] ?: recipient
|
||||||
progressTracker.currentStep = GENERATING_TX
|
progressTracker.currentStep = GENERATING_TX
|
||||||
val builder = TransactionBuilder(notary = null)
|
val builder = TransactionBuilder(notary = null)
|
||||||
|
logger.info("Generating spend for: ${builder.lockId}")
|
||||||
// TODO: Have some way of restricting this to states the caller controls
|
// TODO: Have some way of restricting this to states the caller controls
|
||||||
val (spendTX, keysForSigning) = try {
|
val (spendTX, keysForSigning) = try {
|
||||||
Cash.generateSpend(serviceHub,
|
Cash.generateSpend(serviceHub,
|
||||||
@ -61,10 +62,13 @@ open class CashPaymentFlow(
|
|||||||
}
|
}
|
||||||
|
|
||||||
progressTracker.currentStep = SIGNING_TX
|
progressTracker.currentStep = SIGNING_TX
|
||||||
|
logger.info("Signing transaction for: ${spendTX.lockId}")
|
||||||
val tx = serviceHub.signInitialTransaction(spendTX, keysForSigning)
|
val tx = serviceHub.signInitialTransaction(spendTX, keysForSigning)
|
||||||
|
|
||||||
progressTracker.currentStep = FINALISING_TX
|
progressTracker.currentStep = FINALISING_TX
|
||||||
|
logger.info("Finalising transaction for: ${tx.id}")
|
||||||
val notarised = finaliseTx(tx, setOf(recipient), "Unable to notarise spend")
|
val notarised = finaliseTx(tx, setOf(recipient), "Unable to notarise spend")
|
||||||
|
logger.info("Finalised transaction for: ${notarised.id}")
|
||||||
return Result(notarised, anonymousRecipient)
|
return Result(notarised, anonymousRecipient)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user