Documentation ¶
Overview ¶
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGasLimitReached ¶
IsGasLimitReached block if full of txs.
func IsTxNotAdoptableNow ¶
IsTxNotAdoptableNow tx can not be adopted now.
Types ¶
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
Packer to pack txs and build new blocks.
func (*Packer) Mock ¶
func (p *Packer) Mock(parent *chain.BlockSummary, targetTime uint64, gasLimit uint64) (*Flow, error)
Mock create a packing flow upon given parent, but with a designated timestamp. It will skip the PoA verification and scheduling, and the block produced by the returned flow is not in consensus.
func (*Packer) Schedule ¶
func (p *Packer) Schedule(parent *chain.BlockSummary, nowTimestamp uint64) (flow *Flow, err error)
Schedule schedule a packing flow to pack new block upon given parent and clock time.
func (*Packer) SetTargetGasLimit ¶
SetTargetGasLimit set target gas limit, the Packer will adjust block gas limit close to it as it can.