Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
0b477712
Commit
0b477712
authored
Sep 19, 2018
by
gary rong
Committed by
Péter Szilágyi
Sep 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consensus/clique: hide no transaction error (#17614)
parent
1f45ba9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
clique.go
consensus/clique/clique.go
+2
-6
No files found.
consensus/clique/clique.go
View file @
0b477712
...
...
@@ -134,11 +134,6 @@ var (
// errRecentlySigned is returned if a header is signed by an authorized entity
// that already signed a header recently, thus is temporarily not allowed to.
errRecentlySigned
=
errors
.
New
(
"recently signed"
)
// errWaitTransactions is returned if an empty block is attempted to be sealed
// on an instant chain (0 second period). It's important to refuse these as the
// block reward is zero, so an empty block just bloats the chain... fast.
errWaitTransactions
=
errors
.
New
(
"waiting for transactions"
)
)
// SignerFn is a signer callback function to request a hash to be signed by a
...
...
@@ -615,7 +610,8 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, results c
}
// For 0-period chains, refuse to seal empty blocks (no reward but would spin sealing)
if
c
.
config
.
Period
==
0
&&
len
(
block
.
Transactions
())
==
0
{
return
errWaitTransactions
log
.
Info
(
"Sealing paused, waiting for transactions"
)
return
nil
}
// Don't hold the signer fields for the entire sealing procedure
c
.
lock
.
RLock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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