Documentation ¶
Index ¶
- type Chain
- func (c *Chain) GetCurrentNumberAndHash(db types.StateDB) (uint64, common.Hash, error)
- func (c *Chain) GetHashByNumber(db types.StateDB, number uint64) (common.Hash, error)
- func (c *Chain) InsertHeaders(db types.StateDB, headers []byte) ([]*params.NumberHash, error)
- func (c *Chain) ResetHeaderStore(db types.StateDB, header []byte, td *big.Int) error
- func (c *Chain) ValidateHeaderChain(db types.StateDB, headers []byte, chainType chains.ChainType) (int, error)
- type IChain
- type IHeaderStore
- type IValidate
- type IVerify
- type StoreLoad
- type Validate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { Validate IValidate HeaderStore IHeaderStore }
func (*Chain) GetCurrentNumberAndHash ¶
func (*Chain) GetHashByNumber ¶
func (*Chain) InsertHeaders ¶
func (*Chain) ResetHeaderStore ¶
type IChain ¶
type IChain interface { IValidate IHeaderStore }
func ChainFactory ¶
func ChainFactory(group chains.ChainGroup) (IChain, error)
type IHeaderStore ¶
type IHeaderStore interface { ResetHeaderStore(db types.StateDB, header []byte, td *big.Int) error InsertHeaders(db types.StateDB, headers []byte) ([]*params.NumberHash, error) GetCurrentNumberAndHash(db types.StateDB) (uint64, common.Hash, error) GetHashByNumber(db types.StateDB, number uint64) (common.Hash, error) }
func HeaderStoreFactory ¶
func HeaderStoreFactory(group chains.ChainGroup) (IHeaderStore, error)
type IValidate ¶
type IValidate interface {
ValidateHeaderChain(db types.StateDB, headers []byte, chainType chains.ChainType) (int, error)
}
func ValidateFactory ¶
func ValidateFactory(group chains.ChainGroup) (IValidate, error)
type IVerify ¶
type IVerify interface {
Verify(db types.StateDB, router common.Address, txProveBytes []byte) (logs []byte, err error)
}
func VerifyFactory ¶
func VerifyFactory(group chains.ChainGroup) (IVerify, error)
Click to show internal directories.
Click to hide internal directories.