sftools

package module
v0.0.0-...-bf0c1c2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 15 Imported by: 12

README

on StreamingFast Tools Library

All the on StreamingFast top-level binary like sf-ethereum, sf-near and all others have a bunch of tools to help maintain and debug the various elements of the stack.

This repository contains a chain agnostic shared library that is used to avoid duplication across all projects. It never has chain specific code and everything that is chain specific is injected into the appropriate function.

By conventions, all the functions exported by this library related to specific tooling assumes full control of the console output. If pretty print elements. This greatly reduce the complexity and the specific project can share as much code as possible.

API

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags = &flags{}

Functions

func CheckMergedBlocks

func CheckMergedBlocks(
	ctx context.Context,
	logger *zap.Logger,
	storeURL string,
	fileBlockSize uint32,
	blockRange BlockRange,
	blockPrinter func(block *bstream.Block),
	printDetails PrintDetails,
) error

func RoundToBundleEndBlock

func RoundToBundleEndBlock(block, fileBlockSize uint32) uint32

func RoundToBundleStartBlock

func RoundToBundleStartBlock(block, fileBlockSize uint32) uint32

func WalkBlockPrefix

func WalkBlockPrefix(blockRange BlockRange, fileBlockSize uint32) string

Types

type BlockNum

type BlockNum uint64

func (BlockNum) String

func (b BlockNum) String() string

type BlockRange

type BlockRange struct {
	Start uint64
	Stop  uint64
}

func (BlockRange) ReprocRange

func (b BlockRange) ReprocRange() string

func (BlockRange) String

func (b BlockRange) String() string

func (BlockRange) Unbounded

func (b BlockRange) Unbounded() bool

type FilteringFilters

type FilteringFilters struct {
	Include string
	Exclude string
	System  string
}

func (*FilteringFilters) Key

func (f *FilteringFilters) Key() string

type PrintDetails

type PrintDetails uint8
const (
	PrintNothing PrintDetails = iota
	PrintStats
	PrintFull
)

Jump to

Keyboard shortcuts

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