backendtest

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateP2PMsg

func CreateP2PMsg(code uint64, payload []byte) (p2p.Msg, error)

func GetGenesisAndKeys

func GetGenesisAndKeys(numValidators int, isFullChain bool) (*core.Genesis, []*ecdsa.PrivateKey)

func InitTestBackendFactory

func InitTestBackendFactory(impl TestBackendFactory)

Types

type TestBackendFactory

type TestBackendFactory interface {
	New(isProxy bool, proxiedValAddress common.Address, isProxied bool, genesisCfg *core.Genesis, privateKey *ecdsa.PrivateKey) (TestBackendInterface, *istanbul.Config)

	GetGenesisAndKeys(numValidators int, isFullChain bool) (*core.Genesis, []*ecdsa.PrivateKey)
}

type TestBackendInterface

type TestBackendInterface interface {
	HandleMsg(addr common.Address, msg p2p.Msg, peer consensus.Peer) (bool, error)

	Address() common.Address
}

func NewTestBackend

func NewTestBackend(isProxy bool, proxiedValAddress common.Address, isProxied bool, genesisCfg *core.Genesis, privateKey *ecdsa.PrivateKey) (TestBackendInterface, *istanbul.Config)

Jump to

Keyboard shortcuts

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