txdb

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainTimeGetter

type ChainTimeGetter interface {
	BlockIdForHeight(ctx context.Context, height *common.TimeBlocks) (*common.BlockId, error)
	TimestampForBlockHash(ctx context.Context, hash common.Hash) (*big.Int, error)
}

type TxDB

type TxDB struct {
	Lookup core.ArbOutputLookup
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	arbCore core.ArbCore,
	as machine.NodeStore,
	chain common.Address,
	updateFrequency time.Duration,
) (*TxDB, error)

func (*TxDB) AddLogs

func (db *TxDB) AddLogs(initialLogIndex *big.Int, avmLogs []value.Value) error

func (*TxDB) BlockCount

func (db *TxDB) BlockCount() (uint64, error)

func (*TxDB) Close

func (db *TxDB) Close()

func (*TxDB) DeleteLogs

func (db *TxDB) DeleteLogs(avmLogs []value.Value) error

func (*TxDB) GetBlock

func (db *TxDB) GetBlock(height uint64) (*machine.BlockInfo, error)

func (*TxDB) GetBlockResults

func (db *TxDB) GetBlockResults(block *machine.BlockInfo) (*evm.BlockInfo, []*evm.TxResult, error)

func (*TxDB) GetBlockWithHash

func (db *TxDB) GetBlockWithHash(blockHash common.Hash) (*machine.BlockInfo, error)

func (*TxDB) GetL2Block

func (db *TxDB) GetL2Block(block *machine.BlockInfo) (*evm.BlockInfo, error)

func (*TxDB) GetMessageBatch

func (db *TxDB) GetMessageBatch(index *big.Int) (*evm.MerkleRootResult, error)

func (*TxDB) GetRequest

func (db *TxDB) GetRequest(requestId common.Hash) (*evm.TxResult, error)

func (*TxDB) GetSnapshot

func (db *TxDB) GetSnapshot(blockHeight uint64) (*snapshot.Snapshot, error)

func (*TxDB) HandleLog

func (db *TxDB) HandleLog(logIndex uint64, avmLog value.Value) error

func (*TxDB) LatestBlock

func (db *TxDB) LatestBlock() (*machine.BlockInfo, error)

func (*TxDB) LatestSnapshot

func (db *TxDB) LatestSnapshot() (*snapshot.Snapshot, error)

func (*TxDB) SubscribeBlockProcessingEvent

func (db *TxDB) SubscribeBlockProcessingEvent(ch chan<- []*types.Log) event.Subscription

func (*TxDB) SubscribeChainEvent

func (db *TxDB) SubscribeChainEvent(ch chan<- ethcore.ChainEvent) event.Subscription

func (*TxDB) SubscribeChainHeadEvent

func (db *TxDB) SubscribeChainHeadEvent(ch chan<- ethcore.ChainEvent) event.Subscription

func (*TxDB) SubscribeChainSideEvent

func (db *TxDB) SubscribeChainSideEvent(ch chan<- ethcore.ChainEvent) event.Subscription

func (*TxDB) SubscribeLogsEvent

func (db *TxDB) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription

func (*TxDB) SubscribePendingLogsEvent

func (db *TxDB) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription

func (*TxDB) SubscribeRemovedLogsEvent

func (db *TxDB) SubscribeRemovedLogsEvent(ch chan<- ethcore.RemovedLogsEvent) event.Subscription

Jump to

Keyboard shortcuts

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