old

package
v0.0.0-...-8576238 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockRanger

func BlockRanger()

func DBvsDaemon

func DBvsDaemon() (dbHeight, daemonHeight int)

Check the DB height vs Daemon height and return both

func DatabaseExists

func DatabaseExists() bool

/ check to see if the blocks DB exists

func StoreAddresses

func StoreAddresses()

func StoreBlocks

func StoreBlocks()

func StoreTransactions

func StoreTransactions()

Types

type AddressDB

type AddressDB struct {
	ID            int      `storm:"id,increment" json:"-"` // Primary Key
	TxID          string   `storm:"index" json:"txid"`
	Address       []string `storm:"index" json:"address"`
	Received      float64  `json:"received"`
	Confirmations int64    `json:"confirmations"`
	TxInBlock     string   `json:"block_hash"`
	TxTime        int64    `json:"tx_time"`
}

type BlockDB

type BlockDB struct {
	ID                int64  `storm:"id,increment" json:"-"` // The Primary Key
	Hash              string `storm:"index" json:"hash"`
	Confirmations     int64
	Size              int32
	StrippedSize      int32
	Weight            int32
	Height            int64 `storm:"index" json:"height"`
	Version           int32
	VersionHex        string
	MerkleRoot        string
	BlockTransactions []string
	Time              int64
	Nonce             uint32
	Bits              string
	Difficulty        float64
	PreviousHash      string
	NextHash          string
}

type TransactionDB

type TransactionDB struct {
	ID            int64        `storm:"id,increment" json:"-"` // The Primary Key
	Hex           string       `json:"hex"`
	Txid          string       `storm:"index"`
	Hash          string       `json:"hash,omitempty"`
	Size          int64        `json:"size,omitempty"`
	Vsize         int64        `json:"vsize,omitempty"`
	Version       int64        `json:"version"`
	LockTime      int64        `json:"locktime"`
	Vin           []coind.Vin  `storm:"inline"`
	Vout          []coind.Vout `storm:"inline"`
	BlockHash     string       `json:"blockhash,omitempty"`
	Confirmations int64        `json:"confirmations,omitempty"`
	Time          int64        `json:"time,omitempty"`
	Blocktime     int64        `json:"blocktime,omitempty"`
}

Jump to

Keyboard shortcuts

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