migrations

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: AGPL-3.0 Imports: 29 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MultipleContractsSpecialMigrations = make(map[string]func(ledger.Payload) ([]ledger.Payload, error))
)

Functions

func AddMissingKeysMigration

func AddMissingKeysMigration(payloads []ledger.Payload) ([]ledger.Payload, error)

func MultipleContractMigration

func MultipleContractMigration(payloads []ledger.Payload) ([]ledger.Payload, error)

func NoOpMigration

func NoOpMigration(p []ledger.Payload) ([]ledger.Payload, error)

func PruneMigration added in v0.16.2

func PruneMigration(payload []ledger.Payload) ([]ledger.Payload, error)

PruneMigration removes all the payloads with empty value this prunes the trie for values that has been deleted

func StorageFeesMigration added in v0.13.0

func StorageFeesMigration(payload []ledger.Payload) ([]ledger.Payload, error)

iterates through registers keeping a map of register sizes after it has reached the end it add storage used and storage capacity for each address

func StorageFormatV4Migration added in v0.16.1

func StorageFormatV4Migration(payloads []ledger.Payload) ([]ledger.Payload, error)

Types

type ContractReporter added in v0.15.0

type ContractReporter struct {
	Log       zerolog.Logger
	OutputDir string
}

reports on which contracts are deployed

func (ContractReporter) Report added in v0.15.0

func (r ContractReporter) Report(payload []ledger.Payload) error

type EmptyContainerTypeInferringError added in v0.21.1

type EmptyContainerTypeInferringError struct {
}

func (EmptyContainerTypeInferringError) Error added in v0.21.1

type MultipleContractMigrationError

type MultipleContractMigrationError struct {
	Errors []error
}

func (*MultipleContractMigrationError) Error

type StorageFormatV5Migration added in v0.21.1

type StorageFormatV5Migration struct {
	Log       zerolog.Logger
	OutputDir string

	CleanupStorage bool
	// contains filtered or unexported fields
}

func (*StorageFormatV5Migration) Migrate added in v0.21.1

func (m *StorageFormatV5Migration) Migrate(payloads []ledger.Payload) ([]ledger.Payload, error)

type StorageReporter added in v0.13.0

type StorageReporter struct {
	Log       zerolog.Logger
	OutputDir string
}

iterates through registers keeping a map of register sizes reports on storage metrics

func (StorageReporter) Report added in v0.13.0

func (r StorageReporter) Report(payload []ledger.Payload) error

type StorageUsedUpdateMigration added in v0.21.0

type StorageUsedUpdateMigration struct {
	Log       zerolog.Logger
	OutputDir string
}

func (*StorageUsedUpdateMigration) Migrate added in v0.21.0

func (m *StorageUsedUpdateMigration) Migrate(payload []ledger.Payload) ([]ledger.Payload, error)

iterates through registers keeping a map of register sizes after it has reached the end it add storage used and storage capacity for each address

Jump to

Keyboard shortcuts

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