Expand description
Helper utilities
Functions§
- best_
fork_ index - Auxiliary function to find best ranked fork.
- block_
rank - Compute a block’s rank, assuming that its valid, based on provided mining target.
- deploy_
native_ contracts - Deploy DarkFi native wasm contracts to provided blockchain overlay.
- find_
extended_ fork_ index - Given a proposal, find the index of a fork chain it extends, along with the specific extended proposal index. Additionally, check that proposal doesn’t already exists in any fork chain.
- get_mid
- Auxiliary function to calculate the middle value between provided u64 numbers
- header_
rank - Verify provided header is valid for provided mining target and compute its rank.
- median
- Auxiliary function to calculate the median of a given
Vec<u64>
. The function sorts the vector internally.