Use async_trait in sc-consensus-slots (#8461)

* Use `async_trait` in sc-consensus-slots

This makes the code a little bit easier to read and also expresses that
there can always only be one call at a time to `on_slot`.

* slots: remove mutex around BlockImport in SlotWorker

Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Bastian Köcher
2021-03-27 22:40:28 +01:00
committed by GitHub
parent ff5765eac3
commit 49e79967c8
6 changed files with 179 additions and 155 deletions
+1 -1
View File
@@ -7313,11 +7313,11 @@ dependencies = [
name = "sc-consensus-slots"
version = "0.9.0"
dependencies = [
"async-trait",
"futures 0.3.13",
"futures-timer 3.0.2",
"log",
"parity-scale-codec 2.0.1",
"parking_lot 0.11.1",
"sc-client-api",
"sc-telemetry",
"sp-api",