Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use async_trait in sc-consensus-slots #8461

Merged
merged 2 commits into from
Mar 27, 2021
Merged

Use async_trait in sc-consensus-slots #8461

merged 2 commits into from
Mar 27, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Mar 26, 2021

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.

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`.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Mar 26, 2021
@bkchr bkchr requested review from andresilva and octol March 26, 2021 12:56
Copy link
Contributor

@octol octol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine on a first read through. I'll make sure to have a second look at it though

Copy link
Contributor

@andresilva andresilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's possible to remove the Mutex around BlockImport now?

@bkchr
Copy link
Member Author

bkchr commented Mar 27, 2021

Do you think it's possible to remove the Mutex around BlockImport now?

This was my intention and I already have done this in my other branch which will deal with the BlockImport. But fine to do it here.

@bkchr bkchr merged commit b4e27ee into master Mar 27, 2021
@bkchr bkchr deleted the bkchr-async-trait-slots branch March 27, 2021 21:40
ordian added a commit that referenced this pull request Mar 31, 2021
* master: (84 commits)
  Duplicate logging to stdout (#8495)
  Fix sync restart (#8497)
  client: fix justifications migration (#8489)
  helper macro to create storage types on the fly (#8456)
  Make `BlockImport` and `Verifier` async (#8472)
  Get rid of `test-helpers` feature in sc-consensus-babe (#8486)
  Enhancement on Substrate Node Template (#8473)
  Add Social Network (#8065)
  Prepare UI tests for Rust 1.51 & new CI image (#8474)
  Benchmarking pallet-example (#8301)
  Use pathbuf for remote externalities (#8480)
  Bring back the on_finalize weight of staking. (#8463)
  Implement `fungible::*` for Balances (#8454)
  make types within `generate_solution_type` macro explicit (#8447)
  [pallet-staking] Refund unused weight for `payout_stakers` (#8458)
  Use `async_trait` in sc-consensus-slots (#8461)
  Repot frame_support::traits; introduce some new currency stuff (#8435)
  Fix &mut self -> &self in add_known_address (#8468)
  Add NetworkService::add_known_address (#8467)
  Fix companion check (#8464)
  ...
hirschenberger pushed a commit to hirschenberger/substrate that referenced this pull request Apr 14, 2021
* 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>
jordy25519 pushed a commit to cennznet/substrate that referenced this pull request Sep 20, 2021
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants