mina_tree/
lib.rs

1#![allow(dead_code)]
2#![allow(clippy::type_complexity)]
3#![allow(clippy::too_many_arguments)]
4#![allow(clippy::uninlined_format_args)]
5#![allow(clippy::len_without_is_empty)]
6#![allow(clippy::result_unit_err)]
7// #![forbid(clippy::needless_pass_by_ref_mut)]
8
9// Unused, we don't want to print on stdout
10// /// Print logs on stdout with the prefix `[ledger]`
11// macro_rules! log {
12//     () => (elog!("[ledger]"));
13//     ($($arg:tt)*) => ({
14//         println!("[ledger] {}", format_args!($($arg)*))
15//     })
16// }
17
18/// Print logs on stderr with the prefix `[ledger]`
19macro_rules! elog {
20    () => (elog!("[ledger]"));
21    ($($arg:tt)*) => ({
22        let _ = &format_args!($($arg)*);
23        // eprintln!("[ledger] {}", format_args!($($arg)*));
24    })
25}
26
27// We need a feature to tests both nodejs and browser
28// <https://github.com/rustwasm/wasm-bindgen/issues/2571>
29#[cfg(not(feature = "in_nodejs"))]
30#[cfg(target_family = "wasm")]
31#[cfg(test)]
32mod wasm {
33    use wasm_bindgen_test::*;
34    wasm_bindgen_test_configure!(run_in_browser);
35}
36
37#[macro_use]
38mod cache;
39
40#[cfg(all(not(target_family = "wasm"), feature = "ocaml-interop"))]
41mod ffi;
42
43#[cfg(any(test, feature = "fuzzing"))]
44pub mod generators;
45
46mod account;
47mod address;
48mod base;
49// mod blocks;
50mod database;
51pub mod dummy;
52mod hash;
53pub mod mask;
54pub mod ondisk;
55mod port_ocaml;
56pub mod proofs;
57pub mod scan_state;
58pub mod sparse_ledger;
59pub mod staged_ledger;
60pub mod transaction_pool;
61mod tree;
62mod tree_version;
63mod util;
64pub mod verifier;
65pub mod zkapps;
66
67pub use account::*;
68pub use address::*;
69pub use base::*;
70// pub use blocks::*;
71pub use database::*;
72pub use hash::*;
73pub use mask::*;
74pub use tree::*;
75pub use tree_version::*;
76pub use util::*;