removes use of sc_client::Client from sc_basic_authorship (#5050)

* removes use of sc-client from sc-basic-authorship

* refactor use of ProposerFactory

* correct dep path
This commit is contained in:
Seun Lanlege
2020-02-27 17:12:00 +01:00
committed by GitHub
parent e5123166d4
commit f26f703ad4
16 changed files with 136 additions and 112 deletions
@@ -244,10 +244,10 @@ mod tests {
let select_chain = LongestChain::new(backend.clone());
let inherent_data_providers = InherentDataProviders::new();
let pool = Arc::new(BasicPool::new(Options::default(), api()).0);
let env = ProposerFactory {
transaction_pool: pool.clone(),
client: client.clone(),
};
let env = ProposerFactory::new(
client.clone(),
pool.clone()
);
// this test checks that blocks are created as soon as transactions are imported into the pool.
let (sender, receiver) = futures::channel::oneshot::channel();
let mut sender = Arc::new(Some(sender));
@@ -309,10 +309,10 @@ mod tests {
let select_chain = LongestChain::new(backend.clone());
let inherent_data_providers = InherentDataProviders::new();
let pool = Arc::new(BasicPool::new(Options::default(), api()).0);
let env = ProposerFactory {
transaction_pool: pool.clone(),
client: client.clone(),
};
let env = ProposerFactory::new(
client.clone(),
pool.clone()
);
// this test checks that blocks are created as soon as an engine command is sent over the stream.
let (mut sink, stream) = futures::channel::mpsc::channel(1024);
let future = run_manual_seal(
@@ -378,10 +378,10 @@ mod tests {
let inherent_data_providers = InherentDataProviders::new();
let pool_api = api();
let pool = Arc::new(BasicPool::new(Options::default(), pool_api.clone()).0);
let env = ProposerFactory {
transaction_pool: pool.clone(),
client: client.clone(),
};
let env = ProposerFactory::new(
client.clone(),
pool.clone(),
);
// this test checks that blocks are created as soon as an engine command is sent over the stream.
let (mut sink, stream) = futures::channel::mpsc::channel(1024);
let future = run_manual_seal(