testnode

package
v1.75.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: BSD-3-Clause Imports: 29 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfig

func GetDefaultConfig() *types.Chain33Config

GetDefaultConfig :

func SetWalletSeedForTest added in v1.72.1

func SetWalletSeedForTest(seed string)

SetWalletSeedForTest 为当前进程指定测试钱包助记词。 影响本进程此后创建的所有节点;传空串恢复默认。

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) WaitHeightTimeout added in v1.68.0

func (mock *Chain33Mock) WaitHeightTimeout(height int64, timeout int64) error

WaitHeightTimeout wait with timeout

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