Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
f9b27295
Unverified
Commit
f9b27295
authored
Jun 05, 2020
by
Bastian Köcher
Committed by
GitHub
Jun 05, 2020
Browse files
Companion for Substrate #6123 (#1206)
* Companion for Substrate #6123 * Update Substrate
parent
798f6058
Pipeline
#95471
passed with stages
in 24 minutes and 9 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
f9b27295
This diff is collapsed.
Click to expand it.
service/src/lib.rs
View file @
f9b27295
...
...
@@ -161,9 +161,13 @@ macro_rules! new_full_start {
.with_select_chain
(|
_
,
backend
|
{
Ok
(
sc_consensus
::
LongestChain
::
new
(
backend
.clone
()))
})
?
.with_transaction_pool
(|
config
,
client
,
_fetcher
,
prometheus_registry
|
{
let
pool_api
=
sc_transaction_pool
::
FullChainApi
::
new
(
client
.clone
());
let
pool
=
sc_transaction_pool
::
BasicPool
::
new
(
config
,
std
::
sync
::
Arc
::
new
(
pool_api
),
prometheus_registry
);
.with_transaction_pool
(|
builder
|
{
let
pool_api
=
sc_transaction_pool
::
FullChainApi
::
new
(
builder
.client
()
.clone
());
let
pool
=
sc_transaction_pool
::
BasicPool
::
new
(
builder
.config
()
.transaction_pool
.clone
(),
std
::
sync
::
Arc
::
new
(
pool_api
),
builder
.prometheus_registry
(),
);
Ok
(
pool
)
})
?
.with_import_queue
(|
...
...
@@ -552,12 +556,18 @@ macro_rules! new_light {
.with_select_chain
(|
_
,
backend
|
{
Ok
(
sc_consensus
::
LongestChain
::
new
(
backend
.clone
()))
})
?
.with_transaction_pool
(|
config
,
client
,
fetcher
,
prometheus_registry
|
{
let
fetcher
=
fetcher
.with_transaction_pool
(|
builder
|
{
let
fetcher
=
builder
.
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_api
=
sc_transaction_pool
::
LightChainApi
::
new
(
builder
.client
()
.clone
(),
fetcher
,
);
let
pool
=
sc_transaction_pool
::
BasicPool
::
with_revalidation_type
(
config
,
Arc
::
new
(
pool_api
),
prometheus_registry
,
sc_transaction_pool
::
RevalidationType
::
Light
,
builder
.config
()
.transaction_pool
.clone
(),
Arc
::
new
(
pool_api
),
builder
.prometheus_registry
(),
sc_transaction_pool
::
RevalidationType
::
Light
,
);
Ok
(
pool
)
})
?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment