Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Martin Pugh
polkadot
Commits
38299d3c
Commit
38299d3c
authored
Dec 02, 2020
by
Peter Goodspeed-Niklaus
Browse files
don't modify inherent data on heavy block
parent
550d84a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
node/core/proposer/src/lib.rs
View file @
38299d3c
...
@@ -193,12 +193,19 @@ where
...
@@ -193,12 +193,19 @@ where
record_proof
:
RecordProof
,
record_proof
:
RecordProof
,
)
->
Self
::
Proposal
{
)
->
Self
::
Proposal
{
async
move
{
async
move
{
let
provisioner_data
=
match
self
.get_provisioner_data
()
.await
{
// TODO: how can we tell, here, if we expect a heavy block?
Ok
(
pd
)
=>
pd
,
let
expect_heavy_block
=
false
;
Err
(
err
)
=>
{
tracing
::
warn!
(
err
=
?
err
,
"could not get provisioner inherent data; injecting default data"
);
let
provisioner_data
=
if
!
expect_heavy_block
{
Default
::
default
()
match
self
.get_provisioner_data
()
.await
{
Ok
(
pd
)
=>
pd
,
Err
(
err
)
=>
{
tracing
::
warn!
(
err
=
?
err
,
"could not get provisioner inherent data; injecting default data"
);
Default
::
default
()
}
}
}
}
else
{
Default
::
default
()
};
};
inherent_data
.put_data
(
inherent_data
.put_data
(
...
...
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