diff options
author | gary rong <garyrong0905@gmail.com> | 2018-09-19 17:06:55 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-09-19 17:06:55 +0800 |
commit | 0b477712a1d8abb478b5bb00ec103e0bf100c8da (patch) | |
tree | f39f5fe3a89cc3f6bcb242b9cafc145bb69f794c | |
parent | 1f45ba9bb1c19489a6c8bf9caf100e56dcb79788 (diff) | |
download | dexon-0b477712a1d8abb478b5bb00ec103e0bf100c8da.tar.gz dexon-0b477712a1d8abb478b5bb00ec103e0bf100c8da.tar.zst dexon-0b477712a1d8abb478b5bb00ec103e0bf100c8da.zip |
consensus/clique: hide no transaction error (#17614)
-rw-r--r-- | consensus/clique/clique.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 2b69141c1..eae09f91d 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -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() |