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
cada9124
Unverified
Commit
cada9124
authored
Aug 27, 2021
by
Lldenaurois
Committed by
GitHub
Aug 27, 2021
Browse files
node/service: Update finality target to fix disputes tests (#3732)
parent
948e0f1e
Pipeline
#154499
passed with stages
in 38 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/service/src/relay_chain_selection.rs
View file @
cada9124
...
@@ -415,7 +415,7 @@ where
...
@@ -415,7 +415,7 @@ where
let
lag
=
initial_leaf_number
.saturating_sub
(
subchain_number
);
let
lag
=
initial_leaf_number
.saturating_sub
(
subchain_number
);
self
.metrics
.note_approval_checking_finality_lag
(
lag
);
self
.metrics
.note_approval_checking_finality_lag
(
lag
);
let
lag
=
if
cfg!
(
feature
=
"disputes"
)
{
let
(
lag
,
subchain_head
)
=
if
cfg!
(
feature
=
"disputes"
)
{
// Prevent sending flawed data to the dispute-coordinator.
// Prevent sending flawed data to the dispute-coordinator.
if
Some
(
subchain_block_descriptions
.len
()
as
_
)
!=
if
Some
(
subchain_block_descriptions
.len
()
as
_
)
!=
subchain_number
.checked_sub
(
target_number
)
subchain_number
.checked_sub
(
target_number
)
...
@@ -441,7 +441,7 @@ where
...
@@ -441,7 +441,7 @@ where
std
::
any
::
type_name
::
<
Self
>
(),
std
::
any
::
type_name
::
<
Self
>
(),
)
)
.await
;
.await
;
let
(
subchain_number
,
_
subchain_head
)
=
rx
let
(
subchain_number
,
subchain_head
)
=
rx
.await
.await
.map_err
(
Error
::
OverseerDisconnected
)
.map_err
(
Error
::
OverseerDisconnected
)
.map_err
(|
e
|
ConsensusError
::
Other
(
Box
::
new
(
e
)))
?
.map_err
(|
e
|
ConsensusError
::
Other
(
Box
::
new
(
e
)))
?
...
@@ -450,9 +450,9 @@ where
...
@@ -450,9 +450,9 @@ where
// The the total lag accounting for disputes.
// The the total lag accounting for disputes.
let
lag_disputes
=
initial_leaf_number
.saturating_sub
(
subchain_number
);
let
lag_disputes
=
initial_leaf_number
.saturating_sub
(
subchain_number
);
self
.metrics
.note_disputes_finality_lag
(
lag_disputes
);
self
.metrics
.note_disputes_finality_lag
(
lag_disputes
);
lag_disputes
(
lag_disputes
,
subchain_head
)
}
else
{
}
else
{
lag
(
lag
,
subchain_head
)
};
};
// 4. Apply the maximum safeguard to the finality lag.
// 4. Apply the maximum safeguard to the finality lag.
...
...
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