Documentation ¶
Index ¶
- Constants
- Variables
- func Header2Bytes(wbh *wire.BlockHeader) ([]byte, error)
- func Header2ExactBytes(wbh *wire.BlockHeader, header *[80]byte) error
- func Header2Hex(wbh *wire.BlockHeader) (string, error)
- func Hex2Header(header string) (*wire.BlockHeader, error)
- func ReadHeader(filename string) (*wire.BlockHeader, int, error)
- func ReadHeight(filename string) (int, string, error)
- func WriteHeader(height int, header, dir string) error
- type Header
- type LastHeight
Constants ¶
View Source
const ( DefaultNet = "testnet" HeightFilename = "height" )
Variables ¶
View Source
var DefaultDataDir = filepath.Join(DefaultNet, "bitcoin_headers")
Functions ¶
func Header2Bytes ¶
func Header2Bytes(wbh *wire.BlockHeader) ([]byte, error)
func Header2ExactBytes ¶
func Header2ExactBytes(wbh *wire.BlockHeader, header *[80]byte) error
func Header2Hex ¶
func Header2Hex(wbh *wire.BlockHeader) (string, error)
func Hex2Header ¶
func Hex2Header(header string) (*wire.BlockHeader, error)
func ReadHeader ¶
func ReadHeader(filename string) (*wire.BlockHeader, int, error)
func WriteHeader ¶
Types ¶
type LastHeight ¶
Click to show internal directories.
Click to hide internal directories.