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

Commit

Permalink
fix new_light
Browse files Browse the repository at this point in the history
  • Loading branch information
NikVolf committed Jan 20, 2020
1 parent 43c29a3 commit 0e526e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ pub fn new_light<C: Send + Default + 'static>(config: NodeConfiguration<C>)
let fetcher = fetcher
.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;
let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone());
let pool = sc_transaction_pool::BasicPool::new(config, pool_api);
let pool = sc_transaction_pool::BasicPool::with_revalidation_type(
config, pool_api, sc_transaction_pool::RevalidationType::Light,
);
Ok(pool)
})?
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| {
Expand Down
6 changes: 3 additions & 3 deletions client/transaction-pool/graph/benches/basics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl ChainApi for TestApi {
type Hash = H256;
type Error = sp_transaction_pool::error::Error;
type ValidationFuture = Ready<sp_transaction_pool::error::Result<TransactionValidity>>;
type BodyFuture = Ready<error::Result<Option<Vec<Extrinsic>>>>;
type BodyFuture = Ready<sp_transaction_pool::error::Result<Option<Vec<Extrinsic>>>>;

fn validate_transaction(
&self,
Expand Down Expand Up @@ -155,13 +155,13 @@ fn benchmark_main(c: &mut Criterion) {

c.bench_function("sequential 50 tx", |b| {
b.iter(|| {
bench_configured(Pool::new(Default::default(), TestApi::new_dependant()), 50);
bench_configured(Pool::new(Default::default(), TestApi::new_dependant().into()), 50);
});
});

c.bench_function("random 100 tx", |b| {
b.iter(|| {
bench_configured(Pool::new(Default::default(), TestApi::default()), 100);
bench_configured(Pool::new(Default::default(), TestApi::default().into()), 100);
});
});
}
Expand Down

0 comments on commit 0e526e7

Please sign in to comment.