Skip to content
Snippets Groups Projects
Unverified Commit 909c1e49 authored by ordian's avatar ordian Committed by GitHub
Browse files

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: default avatarTsvetomir Dimitrov <tsvetomir@parity.io>
parent 1dd1a160
Branches
No related merge requests found
Pipeline #430882 passed with stages
in 51 minutes and 23 seconds
......@@ -188,7 +188,7 @@ where
let _candidate_descriptor = candidate_descriptor.clone();
let mut subsystem_sender = subsystem_sender.clone();
let (sender, receiver) = std::sync::mpsc::channel();
self.spawner.spawn(
self.spawner.spawn_blocking(
"malus-get-validation-data",
Some("malus"),
Box::pin(async move {
......
......@@ -95,7 +95,7 @@ where
let dispute_offset = self.dispute_offset;
let mut sender = subsystem_sender.clone();
self.spawner.spawn(
self.spawner.spawn_blocking(
"malus-dispute-finalized-block",
Some("malus"),
Box::pin(async move {
......
......@@ -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 {
......
title: Fix malus implementation.
doc:
- audience: Node Dev
description: |
The malus implementation is used to test security of Polkadot.
It was broken. This fixes it.
crates: [ ]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment