history

package
Version: v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRange

func MakeRange(min, max int64) []int64

func PopulateMissingBlocks

func PopulateMissingBlocks(blockchain core.BlockChain, blockRepository datastore.BlockRepository, startingBlockNumber int64) (int, error)

func PopulateMissingHeaders

func PopulateMissingHeaders(blockChain core.BlockChain, headerRepository datastore.HeaderRepository, startingBlockNumber int64) (int, error)

func RetrieveAndUpdateBlocks

func RetrieveAndUpdateBlocks(blockchain core.BlockChain, blockRepository datastore.BlockRepository, blockNumbers []int64) (int, error)

func RetrieveAndUpdateHeaders

func RetrieveAndUpdateHeaders(blockChain core.BlockChain, headerRepository datastore.HeaderRepository, blockNumbers []int64) (int, error)

Types

type BlockValidator

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

func NewBlockValidator

func NewBlockValidator(blockchain core.BlockChain, blockRepository datastore.BlockRepository, windowSize int) *BlockValidator

func (BlockValidator) ValidateBlocks

func (bv BlockValidator) ValidateBlocks() (ValidationWindow, error)

type HeaderValidator

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

func NewHeaderValidator

func NewHeaderValidator(blockChain core.BlockChain, repository datastore.HeaderRepository, windowSize int) HeaderValidator

func (HeaderValidator) ValidateHeaders

func (validator HeaderValidator) ValidateHeaders() (ValidationWindow, error)

type ValidationWindow

type ValidationWindow struct {
	LowerBound int64
	UpperBound int64
}

func MakeValidationWindow

func MakeValidationWindow(blockchain core.BlockChain, windowSize int) (ValidationWindow, error)

func (ValidationWindow) GetString

func (window ValidationWindow) GetString() string

func (ValidationWindow) Size

func (window ValidationWindow) Size() int

Jump to

Keyboard shortcuts

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