Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
b800909d
Commit
b800909d
authored
4 years ago
by
Svyatoslav Nikolsky
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
block.tx[0] is not invalid if on_initialize is too heavy (#6217)
parent
4adac40c
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/client/basic-authorship/src/basic_authorship.rs
+1
-7
1 addition, 7 deletions
substrate/client/basic-authorship/src/basic_authorship.rs
with
1 addition
and
7 deletions
substrate/client/basic-authorship/src/basic_authorship.rs
+
1
−
7
View file @
b800909d
...
...
@@ -225,7 +225,6 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>
// proceed with transactions
let
block_timer
=
time
::
Instant
::
now
();
let
mut
is_first
=
true
;
let
mut
skipped
=
0
;
let
mut
unqueue_invalid
=
Vec
::
new
();
let
pending_iterator
=
match
executor
::
block_on
(
future
::
select
(
...
...
@@ -261,10 +260,7 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>
}
Err
(
ApplyExtrinsicFailed
(
Validity
(
e
)))
if
e
.exhausted_resources
()
=>
{
if
is_first
{
debug!
(
"[{:?}] Invalid transaction: FullBlock on empty block"
,
pending_tx_hash
);
unqueue_invalid
.push
(
pending_tx_hash
);
}
else
if
skipped
<
MAX_SKIPPED_TRANSACTIONS
{
if
skipped
<
MAX_SKIPPED_TRANSACTIONS
{
skipped
+=
1
;
debug!
(
"Block seems full, but will try {} more transactions before quitting."
,
...
...
@@ -287,8 +283,6 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>
unqueue_invalid
.push
(
pending_tx_hash
);
}
}
is_first
=
false
;
}
self
.transaction_pool
.remove_invalid
(
&
unqueue_invalid
);
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment