merkle-patricia-db-0.1.0: A modified Merkle Patricia DB

Safe HaskellNone
LanguageHaskell2010

Blockchain.Database.MerklePatricia.MPDB

Synopsis

Documentation

data MPDB Source #

This is the database reference type, contianing both the handle to the underlying database, as well as the stateRoot to the current tree holding the data.

The MPDB acts a bit like a traditional database handle, although because it contains the stateRoot, many functions act by updating its value. Because of this, it is recommended that this item be stored and modified within the state monad.

Constructors

MPDB 

Fields

openMPDB Source #

Arguments

:: String

The filepath with the location of the underlying database.

-> ResourceT IO MPDB 

This function is used to create an MPDB object corresponding to the blank database. After creation, the stateRoot can be changed to a previously saved version.