Skip to content

Commit

Permalink
in the python binding, use the local version of sized_bytes instead o…
Browse files Browse the repository at this point in the history
…f chia.types.blockchain_format
  • Loading branch information
arvidn committed Apr 18, 2024
1 parent 785e65f commit af480b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit af480b3

Please sign in to comment.