Skip to content
Merged
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
8 changes: 5 additions & 3 deletions wheel/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ pub fn get_spends_for_trusted_block<'a>(
})
.collect::<Vec<&'a [u8]>>();

let output = get_coinspends_for_trusted_block(constants, &generator, &refs, flags)?;
let output =
py.allow_threads(|| get_coinspends_for_trusted_block(constants, &generator, &refs, flags))?;

let dict = PyDict::new(py);
dict.set_item("block_spends", output)?;
Expand All @@ -575,8 +576,9 @@ pub fn get_spends_for_trusted_block_with_conditions<'a>(
})
.collect::<Vec<&'a [u8]>>();

let output =
get_coinspends_with_conditions_for_trusted_block(constants, &generator, &refs, flags)?;
let output = py.allow_threads(|| {
get_coinspends_with_conditions_for_trusted_block(constants, &generator, &refs, flags)
})?;

let pylist = PyList::empty(py);
for (coinspend, cond_output) in output {
Expand Down
Loading