Documentation ¶
Index ¶
Constants ¶
View Source
const ( BLOCK_VALID_HEADER = 1 BLOCK_VALID_TREE = 2 BLOCK_VALID_TRANSACTIONS = 3 BLOCK_VALID_CHAIN = 4 BLOCK_VALID_SCRIPTS = 5 BLOCK_VALID_MASK = BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS | BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS BLOCK_HAVE_DATA = 8 BLOCK_HAVE_UNDO = 16 BLOCK_HAVE_MASK = BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO BLOCK_FAILED_VALID = 32 BLOCK_FAILED_CHILD = 64 BLOCK_FAILED_MASK = BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD BLOCK_OPT_WITNESS = 128 )
https://github.com/bitcoin/bitcoin/blob/0.15/src/chain.h#L125
Variables ¶
This section is empty.
Functions ¶
func ReadLevelDbBlockHeaderIndex ¶
func ReadLevelDbBlockHeaderIndex(path, blocksPath string, magic uint32, startHeight int) (blkchain.BlockHeaderIndex, error)
Returns a levelDbBlockHeaderIndex over which we can iterate with Next(). Some heights have multiple blocks. This func removes orphans (TODO - why do we, it caused a problem with marking spends, but that should be no longer an issue since we import UTXO set separately?) Core cannot be running during this (TODO why?), but as soon as it is done you should be able to start it back up.
Types ¶
type ChainStateReader ¶
func NewChainStateChecker ¶
func NewChainStateChecker(path string) (*ChainStateReader, error)
func NewChainStateIterator ¶
func NewChainStateIterator(path string) (*ChainStateReader, error)
TODO unused
type DbOutPoint ¶
An OutPoint which uses a varint for N such as the case in chainstate LevelDb keys
Click to show internal directories.
Click to hide internal directories.