Skip to content

Commit

Permalink
Harmonises the names of the parameters across CashExitFlow constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Dudley authored Jan 4, 2018
1 parent 412fead commit 63734aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import java.util.*
class CashExitFlow(private val amount: Amount<Currency>,
private val issuerRef: OpaqueBytes,
progressTracker: ProgressTracker) : AbstractCashFlow<AbstractCashFlow.Result>(progressTracker) {
constructor(amount: Amount<Currency>, issueRef: OpaqueBytes) : this(amount, issueRef, tracker())
constructor(request: ExitRequest) : this(request.amount, request.issueRef, tracker())
constructor(amount: Amount<Currency>, issuerRef: OpaqueBytes) : this(amount, issuerRef, tracker())
constructor(request: ExitRequest) : this(request.amount, request.issuerRef, tracker())

companion object {
fun tracker() = ProgressTracker(GENERATING_TX, SIGNING_TX, FINALISING_TX)
Expand Down Expand Up @@ -78,5 +78,5 @@ class CashExitFlow(private val amount: Amount<Currency>,
}

@CordaSerializable
class ExitRequest(amount: Amount<Currency>, val issueRef: OpaqueBytes) : AbstractRequest(amount)
class ExitRequest(amount: Amount<Currency>, val issuerRef: OpaqueBytes) : AbstractRequest(amount)
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ExplorerSimulation(private val options: OptionSet) {
it.startFlow(::CashIssueAndPaymentFlow, request).log(i, "${request.amount.token}Issuer")
}
is ExitRequest -> issuers[request.amount.token]?.let {
println("${Instant.now()} [$i] EXITING ${request.amount} with ref ${request.issueRef}")
println("${Instant.now()} [$i] EXITING ${request.amount} with ref ${request.issuerRef}")
it.startFlow(::CashExitFlow, request).log(i, "${request.amount.token}Exit")
}
else -> throw IllegalArgumentException("Unsupported command: $request")
Expand Down

0 comments on commit 63734aa

Please sign in to comment.