BIGINT fix for H2 coin selection. (#1658)

* BIGINT fix for H2 coin selection.

* Review feedback
This commit is contained in:
Rick Parker 2017-09-26 14:45:56 +01:00 committed by josecoll
parent 7b94f771b9
commit cd5088cc8b
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ class CashSelectionH2Impl : CashSelection {
spendLock.withLock {
val statement = services.jdbcSession().createStatement()
try {
statement.execute("CALL SET(@t, 0);")
statement.execute("CALL SET(@t, CAST(0 AS BIGINT));")
// we select spendable states irrespective of lock but prioritised by unlocked ones (Eg. null)
// the softLockReserve update will detect whether we try to lock states locked by others

View File

@ -44,17 +44,17 @@ private class TraderDemo {
}
// What happens next depends on the role. The buyer sits around waiting for a trade to start. The seller role
// will contact the buyer and actually make something happen.
// will contact the buyer and actually make something happen. We intentionally use large amounts here.
val role = options.valueOf(roleArg)!!
if (role == Role.BANK) {
val bankHost = NetworkHostAndPort("localhost", bankRpcPort)
CordaRPCClient(bankHost).use("demo", "demo") {
TraderDemoClientApi(it.proxy).runIssuer(1100.DOLLARS, buyerName, sellerName)
TraderDemoClientApi(it.proxy).runIssuer(1_100_000_000.DOLLARS, buyerName, sellerName)
}
} else {
val sellerHost = NetworkHostAndPort("localhost", sellerRpcPort)
CordaRPCClient(sellerHost).use("demo", "demo") {
TraderDemoClientApi(it.proxy).runSeller(1000.DOLLARS, buyerName)
TraderDemoClientApi(it.proxy).runSeller(1_000_000_000.DOLLARS, buyerName)
}
}
}