Expand description
§Floresta Common
Provides utility functions, macros and modules to be used in other Floresta crates.
Re-exports§
pub use spsc::Channel;
Modules§
- ema 🔒
- macros
- This module has useful macros for usage on other crates.
- prelude
- Provides implementation for basic
stdtypes, without assuming we have astdlibrary. - service_
flags - Utreexo-specific service flags.
- spsc
- A no-std Single Producer, Single Consumer channel for unidirectional message exchange between modules. This module don’t use anything from the standard lib and can be easily used in no-std environments. We only use mem::take from core.
Macros§
- acchashes
- Validates Utreexo node hashes at compile time. Requires
BitcoinNodeHashto be in scope. - assert_
err - Panic if the expression is not
Err(_). - assert_
ok - Panic if the expression is not
Ok(_). - bhash
- Validates a block hash at compile time. Requires
BlockHashto be in scope. - impl_
error_ from - Implements the
Fromtrait for converting a specific type into an enum variant or struct field.
Structs§
- Ema
- Exponential moving average (EMA) over scalar samples.
Functions§
- get_
hash_ from_ u8 - Computes the SHA-256 digest of the byte slice data and returns a Hash from
bitcoin_hashes. - get_
spk_ hash - Computes the SHA-256 digest of a script, reverses its bytes, and returns a Hash from
bitcoin_hashes. - parse_
descriptors - Takes an array of descriptors as
String, performs sanity checks on each one and returns list of parsed descriptors. - read_
bounded_ len - Reads a VarInt from the given reader and ensures it is less than or equal to
max.