cuprate_blockchain/ops/mod.rs
1//! Abstracted Monero database operations.
2//!
3//! This module contains many free functions that use the
4//! traits in this crate to generically call Monero-related
5//! database operations.
6//!
7//!
8//! # Atomicity
9//! As transactions are handled by the _caller_ of these functions,
10//! it is up to the caller to decide what happens if one them return
11//! an error.
12//!
13//! # Sub-functions
14//! The main functions within this module are mostly within the [`block`] module.
15//!
16//! Practically speaking, you should only be using 2 functions for mutation:
17//!
18//! The `block` functions are "parent" functions, calling other
19//! sub-functions such as [`add_output()`](output::add_output).
20//!
21//! `add_output()` itself only modifies output-related tables, while the `block` "parent"
22//! functions (like `add_block` and `pop_block`) modify all tables required.
23//!
24//! `add_block()` makes sure all data related to the input is mutated, while
25//! this sub-function _do not_, it specifically mutates _particular_ tables.
26//!
27//! When calling this sub-functions, ensure that either:
28//! 1. This effect (incomplete database mutation) is what is desired, or that...
29//! 2. ...the other tables will also be mutated to a correct state
30//!
31
32pub mod alt_block;
33pub mod block;
34pub mod blockchain;
35pub mod output;
36pub mod property;
37pub mod tx;