HomePhabricator

[CHRONIK] Updated pyo3 version

Description

[CHRONIK] Updated pyo3 version

Summary:
Updated the pyo3 module in chronik-plugin-impl/tests/Cargo.toml.

The old syntax PyModule::from_code_bound() takes in a &str. With the new change to PyModule::from_code(), we need to take in a &CStr.

Therefore, we use CString::new() that returns a result<CString, NulError>. CString is a struct that wraps around a Vec<u8>. We then convert this using as_c_str() which returns a &CStr, which now satisfies PyModule::from_code_bound() parameter rules.

The other changes to call, new, import and empty are only renamed to keep the syntax up to date.

Test Plan: ninja check-functional && ninja check-crates

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, tobias_ruck

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, tobias_ruck

Subscribers: tobias_ruck

Differential Revision: https://reviews.bitcoinabc.org/D17242

Details

Provenance
hazzarustAuthored on Thu, Nov 28, 23:46
hazzarustPushed on Sat, Nov 30, 19:05
Reviewer
Restricted Owners Package
Differential Revision
D17242: [CHRONIK] Updated pyo3 version
Parents
rABCabf17c6cc86e: [Cashtab] Support send token txs with bip21 query strings
Branches
Unknown
Tags
Unknown