index

package
v0.0.0-...-96e5f69 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteIndex

func WriteIndex(fn string, indexForBlocks *BlockIndex) error

Types

type AddrHashIndexType

type AddrHashIndexType struct {
	Addr addr.AddressType      // The address that this is using
	Data map[string]TxWithData // Locaiton in the blockchain, The data, could be public/private or contract body.
}

type AddressIndex

type AddressIndex struct {
	AddrIndex map[string]AddrHashIndexType // Map of address to date (for S.C.)
}

type BlockIndex

type BlockIndex struct {
	Index            []string                       // List of block-hash
	BlockHashToIndex map[string]int                 // map from hash back to index
	AddrData         AddressIndex                   // Contains map of addresses to data on this address
	FindValue        ValueIndex                     // Locaitons of value
	ContractLookup   map[string]map[string][]string // ContractLookup [ Owner ] [ Name ] []Address
}

func BuildIndex

func BuildIndex(bkslice []*block.BlockType) (idx BlockIndex)

func ReadIndex

func ReadIndex(fn string) (idx *BlockIndex, err error)

type TxWithAValue

type TxWithAValue struct {
	BlockIndex  int // Index of this block
	TxOffset    int // position of this Tx in the array of Tx in the block, this is in block.Tx[TxOffset]
	TxOutputPos int // positon of the output with a positive value in the transaction, block.Tx[TxOffset].Output[TxOutputPos]
}

type TxWithData

type TxWithData struct {
	BlockIndex int    // Index of this block
	TxOffset   int    // position of this Tx in the array of Tx in the block, this is in block.Tx[TxOffset]
	TxDataPos  int    // positon of the data, block.Tx[TxOffset].ScData[TxDataPos]
	DataType   string // Type of data stored in tx, contract, data, etc.
}

type TxWithValue

type TxWithValue struct {
	Addr  addr.AddressType // Address of Self
	Value []TxWithAValue   // List of Values in a set of blocks, may have more than one value per block.
}

type ValueIndex

type ValueIndex struct {
	AddrIndex map[string]TxWithValue // Map of address to list of Transaction with output value.
}

Jump to

Keyboard shortcuts

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