mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
Moved the transaction context into the RPC call site.
This commit is contained in:
@ -106,7 +106,9 @@ class CordaRPCOpsImpl(
|
||||
override fun currentNodeTime(): Instant = Instant.now(services.clock)
|
||||
override fun uploadFile(dataType: String, name: String?, file: InputStream): String {
|
||||
val acceptor = services.storageService.uploaders.firstOrNull { it.accepts(dataType) }
|
||||
return acceptor?.upload(file) ?: throw RuntimeException("Cannot find file upload acceptor for $dataType")
|
||||
return databaseTransaction(database) {
|
||||
acceptor?.upload(file) ?: throw RuntimeException("Cannot find file upload acceptor for $dataType")
|
||||
}
|
||||
}
|
||||
|
||||
override fun partyFromKey(key: CompositeKey) = services.identityService.partyFromKey(key)
|
||||
|
Reference in New Issue
Block a user