mirror of
https://github.com/corda/corda.git
synced 2025-06-16 22:28:15 +00:00
Minor: more cleanups
This commit is contained in:
@ -44,7 +44,7 @@ class DBTransactionMappingStorage : StateMachineRecordedTransactionMappingStorag
|
||||
|
||||
private class InnerState {
|
||||
val stateMachineTransactionMap = TransactionMappingsMap()
|
||||
val updates = PublishSubject.create<StateMachineTransactionMapping>()!!
|
||||
val updates: PublishSubject<StateMachineTransactionMapping> = PublishSubject.create()
|
||||
}
|
||||
private val mutex = ThreadBox(InnerState())
|
||||
|
||||
|
@ -44,7 +44,7 @@ class DistributedImmutableMap<K : Any, V : Any>(val db: Database, tableName: Str
|
||||
/** Gets a value for the given [Commands.Get.key] */
|
||||
fun get(commit: Commit<Commands.Get<K, V>>): V? {
|
||||
commit.use {
|
||||
val key = commit.operation().key
|
||||
val key = it.operation().key
|
||||
return databaseTransaction(db) { map[key] }
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class VaultSoftLockManager(val vault: VaultService, smm: StateMachineManager) {
|
||||
|
||||
init {
|
||||
smm.changes.subscribe { (logic, addOrRemove, id) ->
|
||||
if (addOrRemove == AddOrRemove.REMOVE && trackingFlowIds.contains(id.uuid)) {
|
||||
if (addOrRemove == AddOrRemove.REMOVE && id.uuid in trackingFlowIds) {
|
||||
log.trace { "$addOrRemove Flow name ${logic.javaClass} with id $id" }
|
||||
unregisterSoftLocks(id, logic)
|
||||
}
|
||||
|
Reference in New Issue
Block a user