internal

package
v0.0.0-...-dde17ac Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: GPL-3.0 Imports: 14 Imported by: 0

README

Sharding Internal Package

This package should be used for test helpers and non-production code only!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupMockClient

func SetupMockClient(t *testing.T) (*backends.SimulatedBackend, *contracts.VRC)

func TransactOpts

func TransactOpts() *bind.TransactOpts

Types

type MockClient

type MockClient struct {
	VRC *contracts.VRC
	T   *testing.T

	Backend     *backends.SimulatedBackend
	BlockNumber int64
	// contains filtered or unexported fields
}

MockClient for testing proposer.

func (*MockClient) Account

func (m *MockClient) Account() *accounts.Account

func (*MockClient) BlockByNumber

func (m *MockClient) BlockByNumber(ctx context.Context, number *big.Int) (*gethTypes.Block, error)

func (*MockClient) ChainReader

func (m *MockClient) ChainReader() ethereum.ChainReader

func (*MockClient) CommitWithBlock

func (m *MockClient) CommitWithBlock()

func (*MockClient) CreateTXOpts

func (m *MockClient) CreateTXOpts(value *big.Int) (*bind.TransactOpts, error)

func (*MockClient) DepositFlag

func (m *MockClient) DepositFlag() bool

func (*MockClient) FastForward

func (m *MockClient) FastForward(p int)

func (*MockClient) GetShardCount

func (m *MockClient) GetShardCount() (int64, error)

func (*MockClient) SetDepositFlag

func (m *MockClient) SetDepositFlag(value bool)

func (*MockClient) Sign

func (m *MockClient) Sign(hash common.Hash) ([]byte, error)

func (*MockClient) SubscribeNewHead

func (m *MockClient) SubscribeNewHead(ctx context.Context, ch chan<- *gethTypes.Header) (ethereum.Subscription, error)

func (*MockClient) TransactionReceipt

func (m *MockClient) TransactionReceipt(hash common.Hash) (*gethTypes.Receipt, error)

func (*MockClient) VRCCaller

func (m *MockClient) VRCCaller() *contracts.VRCCaller

func (*MockClient) VRCFilterer

func (m *MockClient) VRCFilterer() *contracts.VRCFilterer

func (*MockClient) VRCTransactor

func (m *MockClient) VRCTransactor() *contracts.VRCTransactor

func (*MockClient) WaitForTransaction

func (m *MockClient) WaitForTransaction(ctx context.Context, hash common.Hash, durationInSeconds time.Duration) error

Jump to

Keyboard shortcuts

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