Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStubOracle ¶
func NewStubOracle(t *testing.T) (*StubBlockOracle, *StubStateOracle)
Types ¶
type KvStateOracle ¶
type KvStateOracle struct {
Source ethdb.KeyValueStore
// contains filtered or unexported fields
}
KvStateOracle loads data from a source ethdb.KeyValueStore
func NewKvStateOracle ¶
func NewKvStateOracle(t *testing.T, db ethdb.KeyValueStore) *KvStateOracle
func (*KvStateOracle) CodeByHash ¶
func (o *KvStateOracle) CodeByHash(hash common.Hash) []byte
func (*KvStateOracle) NodeByHash ¶
func (o *KvStateOracle) NodeByHash(nodeHash common.Hash) []byte
type StubBlockOracle ¶
type StubBlockOracle struct {
Blocks map[common.Hash]*types.Block
// contains filtered or unexported fields
}
func NewStubOracleWithBlocks ¶
func (StubBlockOracle) BlockByHash ¶
func (o StubBlockOracle) BlockByHash(blockHash common.Hash) *types.Block
type StubStateOracle ¶
type StubStateOracle struct {
Data map[common.Hash][]byte
Code map[common.Hash][]byte
// contains filtered or unexported fields
}
StubStateOracle is a StateOracle implementation that reads from simple maps
func NewStubStateOracle ¶
func NewStubStateOracle(t *testing.T) *StubStateOracle
func (*StubStateOracle) CodeByHash ¶
func (o *StubStateOracle) CodeByHash(hash common.Hash) []byte
func (*StubStateOracle) NodeByHash ¶
func (o *StubStateOracle) NodeByHash(nodeHash common.Hash) []byte
Click to show internal directories.
Click to hide internal directories.