zcash-android-wallet-sdk / cash.z.wallet.sdk.block / CompactBlockDbStore

CompactBlockDbStore

class CompactBlockDbStore : CompactBlockStore

An implementation of CompactBlockStore that persists information to a database in the given path. This represents the "cache db" or local cache of compact blocks waiting to be scanned.

Parameters

appContext - the application context. This is used for creating the database.

Constructors

<init>

An implementation of CompactBlockStore that persists information to a database in the given path. This represents the "cache db" or local cache of compact blocks waiting to be scanned.

CompactBlockDbStore(appContext: Context, dbPath: String)

Properties

dbPath

the absolute path to the database.

val dbPath: String

Functions

close

Close any connections to the block store.

fun close(): Unit

getLatestHeight

Gets the highest block that is currently stored.

suspend fun getLatestHeight(): Int

rewindTo

Remove every block above and including the given height.

suspend fun rewindTo(height: Int): Unit

write

suspend fun write(result: List<<ERROR CLASS>>): Unit