Documentation
¶
Index ¶
- func CheckHeader(native *native.NativeService, chainID uint64, header wire.BlockHeader, ...) (bool, error)
- func GetBlockHashByHeight(native *native.NativeService, chainID uint64, height uint32) (*chainhash.Hash, error)
- func GetEpoch(native *native.NativeService, chainID uint64, sh *StoredHeader) (*wire.BlockHeader, error)
- func ReIndexHeaderHeight(native *native.NativeService, chainID uint64, bestHeaderHeight uint32, ...) error
- type BTCHandler
- type StoredHeader
- func GetBestBlockHeader(native *native.NativeService, chainID uint64) (*StoredHeader, error)
- func GetCommonAncestor(native *native.NativeService, chainID uint64, ...) (*StoredHeader, []chainhash.Hash, error)
- func GetHeaderByHash(native *native.NativeService, chainID uint64, hash chainhash.Hash) (*StoredHeader, error)
- func GetHeaderByHeight(native *native.NativeService, chainID uint64, height uint32) (*StoredHeader, error)
- func GetPreviousHeader(native *native.NativeService, chainID uint64, header wire.BlockHeader) (*StoredHeader, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHeader ¶
func CheckHeader(native *native.NativeService, chainID uint64, header wire.BlockHeader, prevHeader *StoredHeader) (bool, error)
func GetBlockHashByHeight ¶
func GetEpoch ¶
func GetEpoch(native *native.NativeService, chainID uint64, sh *StoredHeader) (*wire.BlockHeader, error)
func ReIndexHeaderHeight ¶
func ReIndexHeaderHeight(native *native.NativeService, chainID uint64, bestHeaderHeight uint32, hdrs []chainhash.Hash, newBlock *StoredHeader) error
Types ¶
type BTCHandler ¶
type BTCHandler struct { }
func NewBTCHandler ¶
func NewBTCHandler() *BTCHandler
func (*BTCHandler) SyncBlockHeader ¶
func (this *BTCHandler) SyncBlockHeader(native *native.NativeService) error
func (*BTCHandler) SyncCrossChainMsg ¶
func (this *BTCHandler) SyncCrossChainMsg(native *native.NativeService) error
func (*BTCHandler) SyncGenesisHeader ¶
func (this *BTCHandler) SyncGenesisHeader(native *native.NativeService) error
type StoredHeader ¶
type StoredHeader struct { Header wire.BlockHeader Height uint32 // contains filtered or unexported fields }
func GetBestBlockHeader ¶
func GetBestBlockHeader(native *native.NativeService, chainID uint64) (*StoredHeader, error)
func GetCommonAncestor ¶
func GetCommonAncestor(native *native.NativeService, chainID uint64, bestHeader, prevBestHeader *StoredHeader) (*StoredHeader, []chainhash.Hash, error)
func GetHeaderByHash ¶
func GetHeaderByHash(native *native.NativeService, chainID uint64, hash chainhash.Hash) (*StoredHeader, error)
func GetHeaderByHeight ¶
func GetHeaderByHeight(native *native.NativeService, chainID uint64, height uint32) (*StoredHeader, error)
func GetPreviousHeader ¶
func GetPreviousHeader(native *native.NativeService, chainID uint64, header wire.BlockHeader) (*StoredHeader, error)
func (*StoredHeader) Deserialization ¶
func (this *StoredHeader) Deserialization(source *common.ZeroCopySource) error
func (*StoredHeader) Serialization ¶
func (this *StoredHeader) Serialization(sink *common.ZeroCopySink)
Click to show internal directories.
Click to hide internal directories.