testnode

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: BSD-3-Clause Imports: 28 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfig

func GetDefaultConfig() *types.Chain33Config

GetDefaultConfig :

func ModifyParaClient

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

ModifyParaClient modify para config

Types

type Chain33Mock

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

Chain33Mock :

func New

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

New :

func NewWithConfig

func NewWithConfig(cfg *types.Chain33Config, mockapi client.QueueProtocolAPI) *Chain33Mock

NewWithConfig :

func NewWithRPC added in v1.65.0

func NewWithRPC(cfg *types.Chain33Config, mockapi client.QueueProtocolAPI) *Chain33Mock

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

func (*Chain33Mock) Close

func (mock *Chain33Mock) Close()

Close :

func (*Chain33Mock) GetAPI

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

GetAPI :

func (*Chain33Mock) GetAccount

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

GetAccount :

func (*Chain33Mock) GetBlock

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

GetBlock :

func (*Chain33Mock) GetBlockChain

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

GetBlockChain :

func (*Chain33Mock) GetCfg

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

GetCfg :

func (*Chain33Mock) GetClient

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

GetClient :

func (*Chain33Mock) GetExecAccount

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

GetExecAccount :get execer account info

func (*Chain33Mock) GetGenesisAddress

func (mock *Chain33Mock) GetGenesisAddress() string

GetGenesisAddress :

func (*Chain33Mock) GetGenesisKey

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

GetGenesisKey :

func (*Chain33Mock) GetHotAddress

func (mock *Chain33Mock) GetHotAddress() string

GetHotAddress :

func (*Chain33Mock) GetHotKey

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

GetHotKey :

func (*Chain33Mock) GetJSONC

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

GetJSONC :

func (*Chain33Mock) GetLastBlock

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

GetLastBlock :

func (*Chain33Mock) GetLastSendTx added in v1.65.0

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

GetLastSendTx :

func (*Chain33Mock) GetRPC

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

GetRPC :

func (*Chain33Mock) Listen

func (mock *Chain33Mock) Listen()

Listen :

func (*Chain33Mock) SendAndSign

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

SendAndSign :

func (*Chain33Mock) SendAndSignNonce

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

SendAndSignNonce 用外部传入的nonce 重写nonce

func (*Chain33Mock) SendHot

func (mock *Chain33Mock) SendHot() error

SendHot :

func (*Chain33Mock) SendTx

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

SendTx :

func (*Chain33Mock) SendTxRPC

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

SendTxRPC :

func (*Chain33Mock) SetLastSend

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

SetLastSend :

func (*Chain33Mock) Wait

func (mock *Chain33Mock) Wait() error

Wait :

func (*Chain33Mock) WaitHeight

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

WaitHeight :

func (*Chain33Mock) WaitTx

func (mock *Chain33Mock) 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