importer

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiB = 1024
	MiB = 1024 * KiB

	MaxTotalBatchSize               = 20 * MiB
	MaxTotalBatchSizeForNetworkSync = 6 * MiB
	MaxBlocksBatchSize              = 50000
	MaxBlockSize                    = 2 * MiB
)

Variables

This section is empty.

Functions

func ApplyFromFile

func ApplyFromFile(st State, blockchainPath string, nBlocks, startHeight uint64, optimize bool) error

ApplyFromFile reads blocks from blockchainPath, applying them from height startHeight and until nBlocks+1. Setting optimize to true speeds up the import, but it is only safe when importing blockchain from scratch when no rollbacks are possible at all. If the state was rolled back at least once before, `optimize` MUST BE false.

func CheckBalances

func CheckBalances(st State, balancesPath string) error

Types

type State

type State interface {
	AddNewBlocks(blocks [][]byte) error
	AddOldBlocks(blocks [][]byte) error
	WavesAddressesNumber() (uint64, error)
	AccountBalance(account proto.Recipient, asset []byte) (uint64, error)
	ShouldPersistAddressTransactions() (bool, error)
	PersistAddressTransactions() error
}

Jump to

Keyboard shortcuts

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