Skip to main content

clvm_fuzzing/
args.rs

1use clvmr::allocator::{Allocator, NodePtr};
2use clvmr::number::Number;
3
4pub fn build_args(a: &mut Allocator, vals: &[&Number]) -> NodePtr {
5    let mut args = a.nil();
6    for v in vals.iter().rev() {
7        let node = a.new_number((*v).clone()).unwrap();
8        args = a.new_pair(node, args).unwrap();
9    }
10    args
11}