Documentation ¶
Index ¶
- func MakeRange(min, max int64) []int64
- func PopulateMissingBlocks(blockchain core.BlockChain, blockRepository datastore.BlockRepository, ...) (int, error)
- func PopulateMissingHeaders(blockchain core.BlockChain, headerRepository datastore.HeaderRepository, ...) (int, error)
- func RetrieveAndUpdateBlocks(blockchain core.BlockChain, blockRepository datastore.BlockRepository, ...) (int, error)
- func RetrieveAndUpdateHeaders(chain core.BlockChain, headerRepository datastore.HeaderRepository, ...) (int, error)
- type BlockValidator
- type HeaderValidator
- type ValidationWindow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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(chain 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 ¶
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
Click to show internal directories.
Click to hide internal directories.