scanner

package
v0.0.0-...-cfe542b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2015 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvBHtoBTCBH

func ConvBHtoBTCBH(bh BlockHead) *wire.BlockHeader

Public interface to convert a scanner.BlockHead into a wire BlockHeader

Types

type Block

type Block struct {
	PrevBlock *Block
	NextBlock *Block
	Head      *BlockHead
	RelTxs    []*wire.MsgTx
	Hash      [32]byte
	Depth     int
}

A custom block object for processing as a linked list

func RunBlockScan

func RunBlockScan(blockdir string, logger *log.Logger) (*Block, error)

Reads the bitcoin ~/.bitcoin/block dir for the block chain and returns the genesis blk linked all the way to the longest valid chain. Every orphaned block is left out of the chain.

type BlockHead

type BlockHead struct {
	Magic      [4]byte
	Length     uint32
	Version    int32
	PrevHash   [32]byte
	MerkleRoot [32]byte
	Timestamp  uint32
	Difficulty uint32
	Nonce      uint32
}

A struct that matches the exact format of blocks stored in blk*.dat files

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL