testnode

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfig

func GetDefaultConfig() *types.TuringchainConfig

GetDefaultConfig :

func ModifyParaClient

func ModifyParaClient(cfg *types.TuringchainConfig, gaddr string)

ModifyParaClient modify para config

Types

type TuringchainMock

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

TuringchainMock :

func New

func New(cfgpath string, mockapi client.QueueProtocolAPI) *TuringchainMock

New :

func NewWithConfig

func NewWithConfig(cfg *types.TuringchainConfig, mockapi client.QueueProtocolAPI) *TuringchainMock

NewWithConfig :

func NewWithRPC

NewWithRPC 创建测试节点 并开放rpc服务

func (*TuringchainMock) Close

func (mock *TuringchainMock) Close()

Close :

func (*TuringchainMock) GetAPI

func (mock *TuringchainMock) GetAPI() client.QueueProtocolAPI

GetAPI :

func (*TuringchainMock) GetAccount

func (mock *TuringchainMock) GetAccount(stateHash []byte, addr string) *types.Account

GetAccount :

func (*TuringchainMock) GetBlock

func (mock *TuringchainMock) GetBlock(height int64) *types.Block

GetBlock :

func (*TuringchainMock) GetBlockChain

func (mock *TuringchainMock) GetBlockChain() *blockchain.BlockChain

GetBlockChain :

func (*TuringchainMock) GetCfg

func (mock *TuringchainMock) GetCfg() *types.Config

GetCfg :

func (*TuringchainMock) GetClient

func (mock *TuringchainMock) GetClient() queue.Client

GetClient :

func (*TuringchainMock) GetExecAccount

func (mock *TuringchainMock) GetExecAccount(stateHash []byte, execer, addr string) *types.Account

GetExecAccount :get execer account info

func (*TuringchainMock) GetGenesisAddress

func (mock *TuringchainMock) GetGenesisAddress() string

GetGenesisAddress :

func (*TuringchainMock) GetGenesisKey

func (mock *TuringchainMock) GetGenesisKey() crypto.PrivKey

GetGenesisKey :

func (*TuringchainMock) GetHotAddress

func (mock *TuringchainMock) GetHotAddress() string

GetHotAddress :

func (*TuringchainMock) GetHotKey

func (mock *TuringchainMock) GetHotKey() crypto.PrivKey

GetHotKey :

func (*TuringchainMock) GetJSONC

func (mock *TuringchainMock) GetJSONC() *jsonclient.JSONClient

GetJSONC :

func (*TuringchainMock) GetLastBlock

func (mock *TuringchainMock) GetLastBlock() *types.Block

GetLastBlock :

func (*TuringchainMock) GetLastSendTx

func (mock *TuringchainMock) GetLastSendTx() []byte

GetLastSendTx :

func (*TuringchainMock) GetRPC

func (mock *TuringchainMock) GetRPC() *rpc.RPC

GetRPC :

func (*TuringchainMock) Listen

func (mock *TuringchainMock) Listen()

Listen :

func (*TuringchainMock) SendAndSign

func (mock *TuringchainMock) SendAndSign(priv crypto.PrivKey, hextx string) ([]byte, error)

SendAndSign :

func (*TuringchainMock) SendAndSignNonce

func (mock *TuringchainMock) SendAndSignNonce(priv crypto.PrivKey, hextx string, nonce int64) ([]byte, error)

SendAndSignNonce 用外部传入的nonce 重写nonce

func (*TuringchainMock) SendHot

func (mock *TuringchainMock) SendHot() error

SendHot :

func (*TuringchainMock) SendTx

func (mock *TuringchainMock) SendTx(tx *types.Transaction) []byte

SendTx :

func (*TuringchainMock) SendTxRPC

func (mock *TuringchainMock) SendTxRPC(tx *types.Transaction) []byte

SendTxRPC :

func (*TuringchainMock) SetLastSend

func (mock *TuringchainMock) SetLastSend(hash []byte)

SetLastSend :

func (*TuringchainMock) Wait

func (mock *TuringchainMock) Wait() error

Wait :

func (*TuringchainMock) WaitHeight

func (mock *TuringchainMock) WaitHeight(height int64) error

WaitHeight :

func (*TuringchainMock) WaitTx

func (mock *TuringchainMock) WaitTx(hash []byte) (*rpctypes.TransactionDetail, error)

WaitTx :

Jump to

Keyboard shortcuts

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