migration

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(s *pebble.Storage) *Manager

func (*Manager) ApplyAll

func (m *Manager) ApplyAll() (err error)

func (*Manager) IsApplied

func (m *Manager) IsApplied(migration Migration) bool

func (*Manager) RegisterMigration

func (m *Manager) RegisterMigration(migration Migration)

type Migration

type Migration interface {
	GetId() string
	Apply(s *pebble.Storage) error
}

type OldDag

type OldDag struct {
	Hash             models.Hash      `json:"hash"`
	Level            models.Counter   `json:"level"`
	Sender           models.Address   `json:"sender"`
	Timestamp        models.Timestamp `json:"timestamp"`
	TransactionCount models.Counter   `json:"transactionCount"`
}

type OldPbft

type OldPbft struct {
	Author           models.Address   `json:"author"`
	Hash             models.Hash      `json:"hash"`
	Number           models.Counter   `json:"number"`
	PbftHash         models.Hash      `json:"pbftHash"`
	Timestamp        models.Timestamp `json:"timestamp"`
	TransactionCount models.Counter   `json:"transactionCount"`
}

type OldTransaction

type OldTransaction struct {
	BlockNumber      models.Counter         `json:"blockNumber"`
	Calldata         *models.CallData       `json:"calldata,omitempty" rlp:"nil"`
	From             models.Address         `json:"from"`
	GasPrice         models.Counter         `json:"gasPrice"`
	GasUsed          models.Counter         `json:"gasUsed"`
	Hash             models.Hash            `json:"hash"`
	Input            string                 `json:"input"`
	Nonce            models.Counter         `json:"nonce"`
	Status           bool                   `json:"status"`
	Timestamp        models.Timestamp       `json:"timestamp"`
	To               models.Address         `json:"to"`
	TransactionIndex models.Counter         `json:"transactionIndex"`
	Type             models.TransactionType `json:"type"`
	Value            string                 `json:"value"`
}

type RemoveNonceTxIndexAddFeeMigration

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

RemoveSenderMigration is a migration that removes the Sender attribute from the Dag struct.

func (*RemoveNonceTxIndexAddFeeMigration) Apply

Apply is the implementation of the Migration interface for the RemoveSenderMigration.

func (*RemoveNonceTxIndexAddFeeMigration) GetId

type RemovePbftHashMigration

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

RemoveSenderMigration is a migration that removes the Sender attribute from the Dag struct.

func (*RemovePbftHashMigration) Apply

Apply is the implementation of the Migration interface for the RemoveSenderMigration.

func (*RemovePbftHashMigration) GetId

func (m *RemovePbftHashMigration) GetId() string

type RemoveSenderMigration

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

RemoveSenderMigration is a migration that removes the Sender attribute from the Dag struct.

func (*RemoveSenderMigration) Apply

Apply is the implementation of the Migration interface for the RemoveSenderMigration.

func (*RemoveSenderMigration) GetId

func (m *RemoveSenderMigration) GetId() string

Jump to

Keyboard shortcuts

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