malus: use spawn_blocking (#2804)

Looks like using `spawn` instead of `spawn_blocking` in malus is leading
to a deadlock somehow. I'm not sure why exactly, but switching to
`spawn_blocking` fixes
https://github.com/paritytech/disabling-e2e-tests/issues/1, at least for
`suggest-garbage-candidate` (didn't check other variants).

Maybe my assumption here was wrong:
https://github.com/paritytech/polkadot-sdk/pull/2184#discussion_r1403587674.

---------

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
This commit is contained in:
ordian
2024-01-02 11:13:16 +01:00
committed by GitHub
parent 1dd1a16066
commit 909c1e4945
4 changed files with 12 additions and 3 deletions
@@ -113,7 +113,7 @@ where
let (sender, receiver) = std::sync::mpsc::channel();
let mut new_sender = subsystem_sender.clone();
let _candidate = candidate.clone();
self.spawner.spawn(
self.spawner.spawn_blocking(
"malus-get-validation-data",
Some("malus"),
Box::pin(async move {