Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in the python binding, use the local types #471

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/chia-protocol/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ impl<const N: usize> IntoPy<PyObject> for BytesImpl<N> {
impl<const N: usize> ChiaToPython for BytesImpl<N> {
fn to_python<'a>(&self, py: Python<'a>) -> PyResult<&'a PyAny> {
if N == 32 {
let bytes_module = PyModule::import(py, "chia.types.blockchain_format.sized_bytes")?;
let bytes_module = PyModule::import(py, "chia_rs.sized_bytes")?;
let ty = bytes_module.getattr("bytes32")?;
ty.call1((self.0.into_py(py),))
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-traits/src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ macro_rules! primitive_int {
($t:ty, $name:expr) => {
impl ChiaToPython for $t {
fn to_python<'a>(&self, py: Python<'a>) -> PyResult<&'a PyAny> {
let int_module = PyModule::import(py, "chia.util.ints")?;
let int_module = PyModule::import(py, "chia_rs.sized_ints")?;
let ty = int_module.getattr($name)?;
ty.call1((self.into_py(py),))
}
Expand Down
Loading