state

package
v0.0.0-...-5d05a64 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

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

func NewState

func NewState(directory string, filename string) (*State, error)

func (*State) DB

func (s *State) DB() *db.DB

type StateContext

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

func NewStateContext

func NewStateContext(db *db.DB, slotNumber uint64,
	blockProposer []byte, finalizedHeaderHash common.Hash,
	parentBlockHeaderHash common.Hash, blockHeaderHash common.Hash,
	partialBlockSigningHash common.Hash, blockSigningHash common.Hash,
	epochMetaData *metadata.EpochMetaData) (*StateContext, error)

func (*StateContext) AddTransactionFee

func (s *StateContext) AddTransactionFee(fee uint64)

func (*StateContext) BlockProposer

func (s *StateContext) BlockProposer() []byte

func (*StateContext) BlockSigningHash

func (s *StateContext) BlockSigningHash() common.Hash

func (*StateContext) Finalize

func (s *StateContext) Finalize(blockMetaDataPathForFinalization []*metadata.BlockMetaData) error

func (*StateContext) GetBlockHeaderHash

func (s *StateContext) GetBlockHeaderHash() common.Hash

func (*StateContext) GetCurrentBlockTotalStakeAmount

func (s *StateContext) GetCurrentBlockTotalStakeAmount() *big.Int

func (*StateContext) GetDB

func (s *StateContext) GetDB() *db.DB

func (*StateContext) GetEpochBlockHashes

func (s *StateContext) GetEpochBlockHashes() *metadata.EpochBlockHashes

func (*StateContext) GetEpochMetaData

func (s *StateContext) GetEpochMetaData() *metadata.EpochMetaData

func (*StateContext) GetMainChainMetaData

func (s *StateContext) GetMainChainMetaData() *metadata.MainChainMetaData

func (*StateContext) GetParentBlockHeaderHash

func (s *StateContext) GetParentBlockHeaderHash() common.Hash

func (*StateContext) GetSlotNumber

func (s *StateContext) GetSlotNumber() uint64

func (*StateContext) GetTotalTransactionFee

func (s *StateContext) GetTotalTransactionFee() uint64

func (*StateContext) PartialBlockSigningHash

func (s *StateContext) PartialBlockSigningHash() common.Hash

func (*StateContext) PrepareValidators

func (s *StateContext) PrepareValidators(dilithiumPK []byte)

func (*StateContext) ProcessAttestorsFlag

func (s *StateContext) ProcessAttestorsFlag(attestorDilithiumPK []byte, stakeBalance *big.Int) error

func (*StateContext) ProcessBlockProposerFlag

func (s *StateContext) ProcessBlockProposerFlag(blockProposerDilithiumPK []byte, stakeBalance *big.Int) error

func (*StateContext) SetPartialBlockSigningHash

func (s *StateContext) SetPartialBlockSigningHash(p common.Hash)

func (*StateContext) ValidatorsFlag

func (s *StateContext) ValidatorsFlag() map[string]bool

Jump to

Keyboard shortcuts

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