Versions in this module Expand all Collapse all v1 v1.2.0 Jul 8, 2022 Changes in this version + func CalcDifficulty(snap *Snapshot, signer common.Address) *big.Int + func FindAncientHeader(header *types.Header, ite uint64, chain consensus.ChainHeaderReader, ...) *types.Header + func ParliaRLP(header *types.Header, chainId *big.Int) []byte + func ParseValidators(validatorsBytes []byte) ([]common.Address, error) + func SealHash(header *types.Header, chainId *big.Int) (hash common.Hash) + type API struct + func (api *API) GetSnapshot(number *rpc.BlockNumber) (*Snapshot, error) + func (api *API) GetSnapshotAtHash(hash common.Hash) (*Snapshot, error) + func (api *API) GetValidators(number *rpc.BlockNumber) ([]common.Address, error) + func (api *API) GetValidatorsAtHash(hash common.Hash) ([]common.Address, error) + type Parlia struct + func New(chainConfig *params.ChainConfig, db ethdb.Database, ...) *Parlia + func (p *Parlia) APIs(chain consensus.ChainHeaderReader) []rpc.API + func (p *Parlia) AllowLightProcess(chain consensus.ChainReader, currentHeader *types.Header) bool + func (p *Parlia) Author(header *types.Header) (common.Address, error) + func (p *Parlia) Authorize(val common.Address, signFn SignerFn, signTxFn SignerTxFn) + func (p *Parlia) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int + func (p *Parlia) Close() error + func (p *Parlia) Delay(chain consensus.ChainReader, header *types.Header) *time.Duration + func (p *Parlia) EnoughDistance(chain consensus.ChainReader, header *types.Header) bool + func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) error + func (p *Parlia) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, []*types.Receipt, error) + func (p *Parlia) IsLocalBlock(header *types.Header) bool + func (p *Parlia) IsSystemContract(to *common.Address) bool + func (p *Parlia) IsSystemTransaction(tx *types.Transaction, header *types.Header) (bool, error) + func (p *Parlia) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error + func (p *Parlia) Seal(chain consensus.ChainHeaderReader, block *types.Block, ...) error + func (p *Parlia) SealHash(header *types.Header) common.Hash + func (p *Parlia) SignRecently(chain consensus.ChainReader, parent *types.Header) (bool, error) + func (p *Parlia) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header, seal bool) error + func (p *Parlia) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error) + func (p *Parlia) VerifySeal(chain consensus.ChainReader, header *types.Header) error + func (p *Parlia) VerifyUncles(chain consensus.ChainReader, block *types.Block) error + type SignerFn func(accounts.Account, string, []byte) ([]byte, error) + type SignerTxFn func(accounts.Account, *types.Transaction, *big.Int) (*types.Transaction, error) + type Snapshot struct + Hash common.Hash + Number uint64 + RecentForkHashes map[uint64]string + Recents map[uint64]common.Address + Validators map[common.Address]struct{}