mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Reformat files in testing
This commit is contained in:
@ -27,19 +27,21 @@ import java.util.*
|
||||
* Interface for communicating with nodes running the trader demo.
|
||||
*/
|
||||
class TraderDemoClientApi(val rpc: CordaRPCOps) {
|
||||
val cashCount: Long get() {
|
||||
val count = builder { VaultSchemaV1.VaultStates::recordedTime.count() }
|
||||
val countCriteria = QueryCriteria.VaultCustomQueryCriteria(count)
|
||||
return rpc.vaultQueryBy<Cash.State>(countCriteria).otherResults.single() as Long
|
||||
}
|
||||
val cashCount: Long
|
||||
get() {
|
||||
val count = builder { VaultSchemaV1.VaultStates::recordedTime.count() }
|
||||
val countCriteria = QueryCriteria.VaultCustomQueryCriteria(count)
|
||||
return rpc.vaultQueryBy<Cash.State>(countCriteria).otherResults.single() as Long
|
||||
}
|
||||
|
||||
val dollarCashBalance: Amount<Currency> get() = rpc.getCashBalance(USD)
|
||||
|
||||
val commercialPaperCount: Long get() {
|
||||
val count = builder { VaultSchemaV1.VaultStates::recordedTime.count() }
|
||||
val countCriteria = QueryCriteria.VaultCustomQueryCriteria(count)
|
||||
return rpc.vaultQueryBy<CommercialPaper.State>(countCriteria).otherResults.single() as Long
|
||||
}
|
||||
val commercialPaperCount: Long
|
||||
get() {
|
||||
val count = builder { VaultSchemaV1.VaultStates::recordedTime.count() }
|
||||
val countCriteria = QueryCriteria.VaultCustomQueryCriteria(count)
|
||||
return rpc.vaultQueryBy<CommercialPaper.State>(countCriteria).otherResults.single() as Long
|
||||
}
|
||||
|
||||
fun runIssuer(amount: Amount<Currency>, buyerName: CordaX500Name, sellerName: CordaX500Name) {
|
||||
val ref = OpaqueBytes.of(1)
|
||||
|
@ -31,7 +31,9 @@ class CommercialPaperIssueFlow(private val amount: Amount<Currency>,
|
||||
|
||||
companion object {
|
||||
val PROSPECTUS_HASH = SecureHash.parse("decd098666b9657314870e192ced0c3519c2c9d395507a238338f8d003929de9")
|
||||
|
||||
object ISSUING : ProgressTracker.Step("Issuing and timestamping some commercial paper")
|
||||
|
||||
fun tracker() = ProgressTracker(ISSUING)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user