common

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "v0.1-alpha"
	BuildUser = "jahway603"
)

Functions

func BlockIngestor

func BlockIngestor(rpcClient *rpcclient.Client, cache *BlockCache, log *logrus.Entry,
	stopChan chan bool, startHeight int)

func GetBlock

func GetBlock(rpcClient *rpcclient.Client, cache *BlockCache, height int) (*walletrpc.CompactBlock, error)

func GetBlockRange

func GetBlockRange(rpcClient *rpcclient.Client, cache *BlockCache,
	blockOut chan<- walletrpc.CompactBlock, errOut chan<- error, start, end int)

func GetCoinsupply

func GetCoinsupply(rpcClient *rpcclient.Client) (string, string, int, int, int, int, error)

func GetSaplingInfo

func GetSaplingInfo(rpcClient *rpcclient.Client) (int, int, string, string, int, int, int, error)

Types

type BlockCache

type BlockCache struct {
	MaxEntries int

	FirstBlock int
	LastBlock  int
	// contains filtered or unexported fields
}

func NewBlockCache

func NewBlockCache(maxEntries int) *BlockCache

func (*BlockCache) Add

func (c *BlockCache) Add(height int, block *walletrpc.CompactBlock) (error, bool)

func (*BlockCache) Get

func (c *BlockCache) Get(height int) *walletrpc.CompactBlock

func (*BlockCache) GetLatestBlock

func (c *BlockCache) GetLatestBlock() int

type BlockCacheEntry

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

type Options

type Options struct {
	GRPCBindAddr string `json:"grpc_bind_address,omitempty"`
	// contains filtered or unexported fields
}

highlightd CLI options

Jump to

Keyboard shortcuts

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