Documentation
¶
Overview ¶
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Variables
- func GetCanonicalHeight(native *native.NativeService, chainID uint64) (height uint64, err error)
- func ParseValidators(validatorsBytes []byte) ([]ecommon.Address, error)
- func SealHash(header *types.Header, chainID *big.Int) (hash ecommon.Hash)
- type Context
- type ExtraInfo
- type GenesisHeader
- type Handler
- type HeaderWithChainID
- type HeaderWithDifficultySum
- type HeightAndValidators
Constants ¶
This section is empty.
Variables ¶
var (
GasLimitBoundDivisor uint64 = 256 // The bound divisor of the gas limit, used in update calculations.
)
Functions ¶
func GetCanonicalHeight ¶
func GetCanonicalHeight(native *native.NativeService, chainID uint64) (height uint64, err error)
GetCanonicalHeight ...
func ParseValidators ¶
ParseValidators ...
Types ¶
type GenesisHeader ¶
type GenesisHeader struct { Header types.Header PrevValidators []HeightAndValidators }
GenesisHeader ...
type Handler ¶
type Handler struct { }
Handler ...
func (*Handler) SyncBlockHeader ¶
func (h *Handler) SyncBlockHeader(native *native.NativeService) error
SyncBlockHeader ...
func (*Handler) SyncCrossChainMsg ¶
func (h *Handler) SyncCrossChainMsg(native *native.NativeService) error
SyncCrossChainMsg ...
func (*Handler) SyncGenesisHeader ¶
func (h *Handler) SyncGenesisHeader(native *native.NativeService) (err error)
SyncGenesisHeader ...
type HeaderWithChainID ¶
type HeaderWithChainID struct { Header *HeaderWithDifficultySum ChainID uint64 }
HeaderWithChainID ...
type HeaderWithDifficultySum ¶
type HeaderWithDifficultySum struct { Header *types.Header `json:"header"` DifficultySum *big.Int `json:"difficultySum"` EpochParentHash *ecommon.Hash `json:"epochParentHash"` }
HeaderWithDifficultySum ...
func GetCanonicalHeader ¶
func GetCanonicalHeader(native *native.NativeService, chainID uint64, height uint64) (headerWithSum *HeaderWithDifficultySum, err error)
GetCanonicalHeader ...