state

package
v0.0.0-...-7bd4979 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RollbackStateInfo

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

type State

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

func CreateState

func CreateState() (*State, error)

func (*State) DeleteForkState

func (s *State) DeleteForkState() error

func (*State) GetAddressState

func (s *State) GetAddressState(address []byte) (*addressstate.AddressState, error)

func (*State) GetAddressesState

func (s *State) GetAddressesState(addressesState map[string]*addressstate.AddressState) error

func (*State) GetBatch

func (s *State) GetBatch() *leveldb.Batch

func (*State) GetBlock

func (s *State) GetBlock(headerHash []byte) (*block.Block, error)

func (*State) GetBlockByNumber

func (s *State) GetBlockByNumber(blockNumber uint64) (*block.Block, error)

func (*State) GetBlockMetadata

func (s *State) GetBlockMetadata(headerHash []byte) (*metadata.BlockMetaData, error)

func (*State) GetBlockNumberMapping

func (s *State) GetBlockNumberMapping(blockNumber uint64) (*generated.BlockNumberMapping, error)

func (*State) GetBlockSizeLimit

func (s *State) GetBlockSizeLimit(b *block.Block) (int, error)

func (*State) GetChainHeight

func (s *State) GetChainHeight() (uint64, error)

func (*State) GetForkState

func (s *State) GetForkState() (*generated.ForkState, error)

func (*State) GetLastBlock

func (s *State) GetLastBlock() (*block.Block, error)

func (*State) GetMeasurement

func (s *State) GetMeasurement(blockTimestamp uint32, parentHeaderHash []byte, parentMetaData *metadata.BlockMetaData) (uint64, error)

func (*State) GetTotalCoinSupply

func (s *State) GetTotalCoinSupply() (uint64, error)

func (*State) GetTxMetadata

func (s *State) GetTxMetadata(txHash []byte) (*generated.TransactionMetadata, error)

func (*State) MockAddressState

func (s *State) MockAddressState(address []byte, nonce uint64, balance uint64) error

func (*State) PutAddressesState

func (s *State) PutAddressesState(addressesState map[string]*addressstate.AddressState, batch *leveldb.Batch) error

func (*State) PutBlock

func (s *State) PutBlock(b *block.Block, batch *leveldb.Batch) error

func (*State) PutBlockMetadata

func (s *State) PutBlockMetadata(headerHash []byte, b *metadata.BlockMetaData, batch *leveldb.Batch) error

func (*State) PutBlockNumberMapping

func (s *State) PutBlockNumberMapping(blockNumber uint64, blockNumberMapping *generated.BlockNumberMapping, batch *leveldb.Batch) error

func (*State) PutChainHeight

func (s *State) PutChainHeight(height uint64, batch *leveldb.Batch) error

func (*State) PutForkState

func (s *State) PutForkState(forkState *generated.ForkState, batch *leveldb.Batch) error

func (*State) ReduceTotalCoinSupply

func (s *State) ReduceTotalCoinSupply(value uint64, batch *leveldb.Batch) error

func (*State) RemoveBlock

func (s *State) RemoveBlock(headerHash []byte) error

func (*State) RemoveBlockMetadata

func (s *State) RemoveBlockMetadata(headerHash []byte) error

func (*State) RemoveBlockNumberMapping

func (s *State) RemoveBlockNumberMapping(blockNumber uint64) error

func (*State) RemoveTxMetadata

func (s *State) RemoveTxMetadata(tx *transactions.Transaction) error

func (*State) RollbackTxMetadata

func (s *State) RollbackTxMetadata(block *block.Block, batch *leveldb.Batch) error

func (*State) UnsetOTSKey

func (s *State) UnsetOTSKey(a *addressstate.AddressState, otsKeyIndex uint64) error

func (*State) UpdateTxMetadata

func (s *State) UpdateTxMetadata(block *block.Block, batch *leveldb.Batch) error

func (*State) WriteBatch

func (s *State) WriteBatch(batch *leveldb.Batch)

Jump to

Keyboard shortcuts

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