mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 15:41:02 +00:00
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:
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
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: [ ]
|
||||
Reference in New Issue
Block a user