clvmr 0.18.0

Implementation of `clvm` for Chia Network's cryptocurrency
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::error::{EvalErr, Result};

pub type Cost = u64;

pub fn check_cost(cost: Cost, max_cost: Cost) -> Result<()> {
    if cost > max_cost {
        Err(EvalErr::CostExceeded)
    } else {
        Ok(())
    }
}