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

CompactBlockStore

interface CompactBlockStore

Interface for storing compact blocks.

Functions

close

Close any connections to the block store.

abstract fun close(): Unit

getLatestHeight

Gets the highest block that is currently stored.

abstract suspend fun getLatestHeight(): Int

rewindTo

Remove every block above and including the given height.

abstract suspend fun rewindTo(height: Int): Unit

write

Write the given blocks to this store, which may be anything from an in-memory cache to a DB.

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

Inheritors

CompactBlockDbStore

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.

class CompactBlockDbStore : CompactBlockStore