Skip to content

Commit 0b47771

Browse files
rjl493456442karalabe
authored andcommitted
consensus/clique: hide no transaction error (#17614)
1 parent 1f45ba9 commit 0b47771

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎consensus/clique/clique.go‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ var (
134134
// errRecentlySigned is returned if a header is signed by an authorized entity
135135
// that already signed a header recently, thus is temporarily not allowed to.
136136
errRecentlySigned = errors.New("recently signed")
137-
138-
// errWaitTransactions is returned if an empty block is attempted to be sealed
139-
// on an instant chain (0 second period). It's important to refuse these as the
140-
// block reward is zero, so an empty block just bloats the chain... fast.
141-
errWaitTransactions = errors.New("waiting for transactions")
142137
)
143138

144139
// 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
615610
}
616611
// For 0-period chains, refuse to seal empty blocks (no reward but would spin sealing)
617612
if c.config.Period == 0 && len(block.Transactions()) == 0 {
618-
return errWaitTransactions
613+
log.Info("Sealing paused, waiting for transactions")
614+
return nil
619615
}
620616
// Don't hold the signer fields for the entire sealing procedure
621617
c.lock.RLock()

0 commit comments

Comments
 (0)