Documentation ¶
Index ¶
- func GetDefaultConfig() *types.TuringchainConfig
- func ModifyParaClient(cfg *types.TuringchainConfig, gaddr string)
- type TuringchainMock
- func (mock *TuringchainMock) Close()
- func (mock *TuringchainMock) GetAPI() client.QueueProtocolAPI
- func (mock *TuringchainMock) GetAccount(stateHash []byte, addr string) *types.Account
- func (mock *TuringchainMock) GetBlock(height int64) *types.Block
- func (mock *TuringchainMock) GetBlockChain() *blockchain.BlockChain
- func (mock *TuringchainMock) GetCfg() *types.Config
- func (mock *TuringchainMock) GetClient() queue.Client
- func (mock *TuringchainMock) GetExecAccount(stateHash []byte, execer, addr string) *types.Account
- func (mock *TuringchainMock) GetGenesisAddress() string
- func (mock *TuringchainMock) GetGenesisKey() crypto.PrivKey
- func (mock *TuringchainMock) GetHotAddress() string
- func (mock *TuringchainMock) GetHotKey() crypto.PrivKey
- func (mock *TuringchainMock) GetJSONC() *jsonclient.JSONClient
- func (mock *TuringchainMock) GetLastBlock() *types.Block
- func (mock *TuringchainMock) GetLastSendTx() []byte
- func (mock *TuringchainMock) GetRPC() *rpc.RPC
- func (mock *TuringchainMock) Listen()
- func (mock *TuringchainMock) SendAndSign(priv crypto.PrivKey, hextx string) ([]byte, error)
- func (mock *TuringchainMock) SendAndSignNonce(priv crypto.PrivKey, hextx string, nonce int64) ([]byte, error)
- func (mock *TuringchainMock) SendHot() error
- func (mock *TuringchainMock) SendTx(tx *types.Transaction) []byte
- func (mock *TuringchainMock) SendTxRPC(tx *types.Transaction) []byte
- func (mock *TuringchainMock) SetLastSend(hash []byte)
- func (mock *TuringchainMock) Wait() error
- func (mock *TuringchainMock) WaitHeight(height int64) error
- func (mock *TuringchainMock) WaitTx(hash []byte) (*rpctypes.TransactionDetail, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewWithConfig ¶
func NewWithConfig(cfg *types.TuringchainConfig, mockapi client.QueueProtocolAPI) *TuringchainMock
NewWithConfig :
func NewWithRPC ¶
func NewWithRPC(cfg *types.TuringchainConfig, mockapi client.QueueProtocolAPI) *TuringchainMock
NewWithRPC 创建测试节点 并开放rpc服务
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) 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) SendAndSign ¶
SendAndSign :
func (*TuringchainMock) SendAndSignNonce ¶
func (mock *TuringchainMock) SendAndSignNonce(priv crypto.PrivKey, hextx string, nonce int64) ([]byte, error)
SendAndSignNonce 用外部传入的nonce 重写nonce
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) WaitHeight ¶
func (mock *TuringchainMock) WaitHeight(height int64) error
WaitHeight :
func (*TuringchainMock) WaitTx ¶
func (mock *TuringchainMock) WaitTx(hash []byte) (*rpctypes.TransactionDetail, error)
WaitTx :
Click to show internal directories.
Click to hide internal directories.