jsonrpccache

package
v0.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(blockchainDB func(chainState state.State) *emulator.BlockchainDB) *Cache

func (*Cache) BlockByHash

func (c *Cache) BlockByHash(hash common.Hash) *types.Block

func (*Cache) BlockByNumber

func (c *Cache) BlockByNumber(n *big.Int) *types.Block

func (*Cache) BlockTrieHashByIndex

func (c *Cache) BlockTrieHashByIndex(n uint32) *trie.Hash

func (*Cache) CacheBlock

func (c *Cache) CacheBlock(trieRoot trie.Hash, stateByTrieRoot func(trieRoot trie.Hash) (state.State, error))

func (*Cache) TxByBlockHashAndIndex

func (c *Cache) TxByBlockHashAndIndex(hash common.Hash, index uint64) (tx *types.Transaction, blockNumber uint64)

func (*Cache) TxByBlockNumberAndIndex

func (c *Cache) TxByBlockNumberAndIndex(blockNumber *big.Int, index uint64) (tx *types.Transaction, blockHash common.Hash)

func (*Cache) TxByHash

func (c *Cache) TxByHash(hash common.Hash) (*types.Transaction, *types.Block, uint64)

Jump to

Keyboard shortcuts

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