Skip to content

Instantly share code, notes, and snippets.

View dazraf's full-sized avatar
💭
Mostly on gitlab. Same ID.

dazraf dazraf

💭
Mostly on gitlab. Same ID.
View GitHub Profile
@dazraf
dazraf / DiagnosticsService.kt
Created January 24, 2019 18:04
How to get Corda StateRefs that are locked without corresponding flows (using some Cordite extension methods)
import io.cordite.commons.database.executeCaseInsensitiveQuery
import io.cordite.commons.utils.transaction
import net.corda.core.contracts.StateRef
import net.corda.core.crypto.SecureHash
import net.corda.core.node.AppServiceHub
import net.corda.core.node.services.CordaService
import net.corda.core.serialization.SingletonSerializeAsToken
import net.corda.core.utilities.loggerFor
import net.corda.node.services.statemachine.StateMachineManager
import java.util.*