StoredMerklePatriciaTrie(storage: MerkleStorage, valueSerializer: (V) -> Bytes, valueDeserializer: (Bytes) -> V)
Create a trie.
storage
- The storage to use for persistence.
valueSerializer
- A function for serializing values to bytes.
valueDeserializer
- A function for deserializing values from bytes.
StoredMerklePatriciaTrie(storage: MerkleStorage, rootHash: Bytes32, valueSerializer: (V) -> Bytes, valueDeserializer: (Bytes) -> V)
Create a trie.
storage
- The storage to use for persistence.
rootHash
- The initial root has for the trie, which should be already present in storage
.
valueSerializer
- A function for serializing values to bytes.
valueDeserializer
- A function for deserializing values from bytes.