Skip to content

Commit

Permalink
re-rename npc and type a Vec
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-o-how committed Jul 30, 2024
1 parent 019b2f1 commit 48c706a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/chia-consensus/src/gen/condition_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ mod tests {

use crate::r#gen::conditions::Spend;

let mut expected_result = Vec::new();
let mut expected_result = Vec::<u8>::new();
expected_result.extend(msg);

let coin = Coin::new(
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/src/spendbundle_conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use clvmr::run_program::run_program;
use clvmr::serde::node_from_bytes;
use std::collections::{HashMap, HashSet};

pub fn get_name_puzzle_conditions(
pub fn get_conditions_from_spendbundle(
spend_bundle: &SpendBundle,
max_cost: u64,
height: u32,
Expand Down
10 changes: 5 additions & 5 deletions wheel/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use chia_consensus::spendbundle_validation::{
get_flags_for_height_and_constants, validate_clvm_and_signature,
};

use chia_consensus::spendbundle_conditions::get_name_puzzle_conditions;
use chia_consensus::spendbundle_conditions::get_conditions_from_spendbundle;
use chia_protocol::{
BlockRecord, Bytes32, ChallengeBlockInfo, ChallengeChainSubSlot, ClassgroupElement, Coin,
CoinSpend, CoinState, CoinStateFilters, CoinStateUpdate, EndOfSubSlotBundle, Foliage,
Expand Down Expand Up @@ -400,14 +400,14 @@ pub fn py_validate_clvm_and_signature(
}

#[pyfunction]
#[pyo3(name = "get_name_puzzle_conditions")]
pub fn py_get_name_puzzle_conditions(
#[pyo3(name = "get_conditions_from_spendbundle")]
pub fn py_get_conditions_from_spendbundle(
spend_bundle: &SpendBundle,
max_cost: u64,
constants: &ConsensusConstants,
height: u32,
) -> PyResult<OwnedSpendBundleConditions> {
let osbc = get_name_puzzle_conditions(spend_bundle, max_cost, height, constants).map_err(
let osbc = get_conditions_from_spendbundle(spend_bundle, max_cost, height, constants).map_err(
|e| {
let error_code: u32 = e.1.into();
PyErr::new::<PyTypeError, _>(error_code)
Expand Down Expand Up @@ -457,7 +457,7 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {

// multithread validattion
m.add_function(wrap_pyfunction!(py_validate_clvm_and_signature, m)?)?;
m.add_function(wrap_pyfunction!(pyget_name_puzzle_conditions, m)?)?;
m.add_function(wrap_pyfunction!(py_get_conditions_from_spendbundle, m)?)?;
m.add_function(wrap_pyfunction!(py_get_flags_for_height_and_constants, m)?)?;

// clvm functions
Expand Down

0 comments on commit 48c706a

Please sign in to comment.