tuweni / org.apache.tuweni.trie / AsyncMerkleStorage

AsyncMerkleStorage

abstract class AsyncMerkleStorage : MerkleStorage (source)

A MerkleStorage implementation using AsyncResult's.

Constructors

<init>

AsyncMerkleStorage()

A MerkleStorage implementation using AsyncResult's.

Functions

get

open suspend fun get(hash: Bytes32): Bytes?

Get the stored content under the given hash.

getAsync

abstract fun getAsync(hash: Bytes32): AsyncResult<Bytes?>

Get the stored content under the given hash.

put

open suspend fun put(hash: Bytes32, content: Bytes): Unit

Store content with a given hash.

putAsync

abstract fun putAsync(hash: Bytes32, content: Bytes): AsyncCompletion

Store content with a given hash.