pksvc

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: LGPL-3.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultPkgSize = 1024
)

Variables

View Source
var (
	ErrBlockNotFound = errors.New("Block not found")
	ErrPackageTooOld = errors.New("Package is too old")
)
View Source
var (
	ErrTxAlreadyExist            = errors.New("the tx already exists in the pool of packer")
	ErrPoolNotBigEnough          = errors.New("the tx pool doesn't have enough tx")
	ErrTransactionNotMatchPacker = errors.New("the transaction and the packer don't match")
	ErrIsBroadcastTx             = errors.New("the transaction should be broadcast")
)
View Source
var TxPackageType = reflect.TypeOf(types.TxPackage{})

Functions

func ElemsToTxPkgHashes

func ElemsToTxPkgHashes(elems []pool.Element) []common.Hash

func ElemsToTxPkgs

func ElemsToTxPkgs(elems []pool.Element) []*types.TxPackage

func NewPacker

func NewPacker(cfg *config.Config, pkgPool pool.Pool, packerKeyManager packerKeyManager, txSigner types.Signer, chain blockChain, packerGroupSize uint64) packer.Packer

func NewPkgPool

func NewPkgPool(conf config.PoolConfig, c *chain.BlockChain) pool.Pool

Types

type PkgHelper

type PkgHelper struct {
}

func (*PkgHelper) Reset

func (h *PkgHelper) Reset(pool pool.Pool, block *types.Block)

func (*PkgHelper) Sender

func (h *PkgHelper) Sender(ele pool.Element) (common.Address, error)

func (*PkgHelper) Validate

func (h *PkgHelper) Validate(p pool.Pool, ele pool.Element, currentState pool.StateDB, chain pool.BlockChain) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL