Crate floresta_chain

Source
Expand description

§Floresta Chain

This crate provides the core validation logic for a full node using libfloresta. It is maintained as a separate crate to allow other projects to build on it, independent of the libfloresta P2P network or libfloresta wallet. The main entry point is the ChainState struct, that keeps track of the current blockchain state, like headers and utreexo accumulator.

All data is stored in a ChainStore implementation, which is generic over the underlying database. See the ChainStore trait for more information. For a ready-to-use implementation, see the KvChainStore struct.

Re-exports§

pub use pruned_utreexo::ChainBackend;
pub use pruned_utreexo::Notification;
pub use pruned_utreexo::ThreadSafeChain;
pub use pruned_utreexo::chain_state::*;
pub use pruned_utreexo::chainparams::*;
pub use pruned_utreexo::chainstore::*;
pub use pruned_utreexo::error::*;
pub use pruned_utreexo::flat_chain_store::*;flat-chainstore
pub use pruned_utreexo::kv_chainstore::*;kv-chainstore
pub use pruned_utreexo::udata::*;

Modules§

pruned_utreexo
The pruned utreexo module handles the full blockchain logic: validation, state tracking and interfacing. This blockchain backend does not store the historical blocks, it’s pruned.

Macros§

read_lock
Grabs a RwLock for reading
write_lock
Grabs a RwLock for writing