Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions substrate/bft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub trait Proposer<B: Block> {
/// Block import trait.
pub trait BlockImport<B: Block> {
/// Import a block alongside its corresponding justification.
fn import_block(&self, block: B, justification: Justification<B::Hash>);
fn import_block(&self, block: B, justification: Justification<B::Hash>, authorities: &[AuthorityId]);
}

/// Trait for getting the authorities at a given block.
Expand Down Expand Up @@ -308,7 +308,8 @@ impl<B, P, I, InStream, OutSink> Future for BftFuture<B, P, I, InStream, OutSink
info!(target: "bft", "Importing block #{} ({}) directly from BFT consensus",
justified_block.header().number(), justified_block.hash());

self.import.import_block(justified_block, committed.justification)
self.import.import_block(justified_block, committed.justification,
&self.inner.context().authorities)
}

Ok(Async::Ready(()))
Expand Down Expand Up @@ -649,7 +650,7 @@ mod tests {
}

impl BlockImport<TestBlock> for FakeClient {
fn import_block(&self, block: TestBlock, _justification: Justification<H256>) {
fn import_block(&self, block: TestBlock, _justification: Justification<H256>, _authorities: &[AuthorityId]) {
assert!(self.imported_heights.lock().insert(block.header.number))
}
}
Expand Down
Loading