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

Commit

Permalink
grandpa: make it compile against GRANDPA with expose round state
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilva authored and octol committed Apr 7, 2020
1 parent 7c4d5e7 commit e803c89
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions client/finality-grandpa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ sp-finality-tracker = { version = "2.0.0-alpha.5", path = "../../primitives/fina
sp-finality-grandpa = { version = "2.0.0-alpha.5", path = "../../primitives/finality-grandpa" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-alpha.5"}
sc-block-builder = { version = "0.8.0-alpha.5", path = "../block-builder" }
finality-grandpa = { version = "0.11.2", features = ["derive-codec"] }
#finality-grandpa = { version = "0.11.2", features = ["derive-codec"] }
finality-grandpa = { git = "https://github.com/paritytech/finality-grandpa", branch = "andre/expose-voter-state-v11", features = ["derive-codec"] }
pin-project = "0.4.6"

[dev-dependencies]
finality-grandpa = { version = "0.11.2", features = ["derive-codec", "test-helpers"] }
#finality-grandpa = { version = "0.11.2", features = ["derive-codec", "test-helpers"] }
finality-grandpa = { git = "https://github.com/paritytech/finality-grandpa", branch = "andre/expose-voter-state-v11", features = ["derive-codec", "test-helpers"] }
sc-network = { version = "0.8.0-alpha.5", path = "../network" }
sc-network-test = { version = "0.8.0-dev", path = "../network/test" }
sp-keyring = { version = "2.0.0-alpha.5", path = "../../primitives/keyring" }
Expand Down
8 changes: 4 additions & 4 deletions client/finality-grandpa/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,23 +580,23 @@ where
Block: 'static,
B: Backend<Block>,
C: crate::ClientForGrandpa<Block, B> + 'static,
N: NetworkT<Block> + 'static + Send,
N: NetworkT<Block> + 'static + Send + Sync,
SC: SelectChain<Block> + 'static,
VR: VotingRule<Block, C>,
NumberFor<Block>: BlockNumberOps,
{
type Timer = Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send>>;
type Timer = Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + Sync>>;
type Id = AuthorityId;
type Signature = AuthoritySignature;

// regular round message streams
type In = Pin<Box<dyn Stream<
Item = Result<::finality_grandpa::SignedMessage<Block::Hash, NumberFor<Block>, Self::Signature, Self::Id>, Self::Error>
> + Send>>;
> + Send + Sync>>;
type Out = Pin<Box<dyn Sink<
::finality_grandpa::Message<Block::Hash, NumberFor<Block>>,
Error = Self::Error,
> + Send>>;
> + Send + Sync>>;

type Error = CommandOrError<Block::Hash, NumberFor<Block>>;

Expand Down
2 changes: 1 addition & 1 deletion client/finality-grandpa/src/until_imported.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub(crate) struct UntilImported<Block: BlockT, BlockStatus, BlockSyncRequester,
inner: Fuse<I>,
ready: VecDeque<M::Blocked>,
/// Interval at which to check status of each awaited block.
check_pending: Pin<Box<dyn Stream<Item = Result<(), std::io::Error>> + Send>>,
check_pending: Pin<Box<dyn Stream<Item = Result<(), std::io::Error>> + Send + Sync>>,
/// Mapping block hashes to their block number, the point in time it was
/// first encountered (Instant) and a list of GRANDPA messages referencing
/// the block hash.
Expand Down

0 comments on commit e803c89

Please sign in to comment.