Documentation ¶
Index ¶
- func GetDefaultConfig() (*types.Config, *types.ConfigSubModule)
- type Chain33Mock
- func (mock *Chain33Mock) Close()
- func (mock *Chain33Mock) GetAPI() client.QueueProtocolAPI
- func (mock *Chain33Mock) GetAccount(stateHash []byte, addr string) *types.Account
- func (mock *Chain33Mock) GetBlock(height int64) *types.Block
- func (mock *Chain33Mock) GetBlockChain() *blockchain.BlockChain
- func (mock *Chain33Mock) GetCfg() *types.Config
- func (mock *Chain33Mock) GetClient() queue.Client
- func (mock *Chain33Mock) GetExecAccount(stateHash []byte, execer, addr string) *types.Account
- func (mock *Chain33Mock) GetGenesisAddress() string
- func (mock *Chain33Mock) GetGenesisKey() crypto.PrivKey
- func (mock *Chain33Mock) GetHotAddress() string
- func (mock *Chain33Mock) GetHotKey() crypto.PrivKey
- func (mock *Chain33Mock) GetJSONC() *jsonclient.JSONClient
- func (mock *Chain33Mock) GetLastBlock() *types.Block
- func (mock *Chain33Mock) GetRPC() *rpc.RPC
- func (mock *Chain33Mock) Listen()
- func (mock *Chain33Mock) SendAndSign(priv crypto.PrivKey, hextx string) ([]byte, error)
- func (mock *Chain33Mock) SendAndSignNonce(priv crypto.PrivKey, hextx string, nonce int64) ([]byte, error)
- func (mock *Chain33Mock) SendHot() error
- func (mock *Chain33Mock) SendTx(tx *types.Transaction) []byte
- func (mock *Chain33Mock) Wait() error
- func (mock *Chain33Mock) WaitHeight(height int64) error
- func (mock *Chain33Mock) WaitTx(hash []byte) (*rpctypes.TransactionDetail, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultConfig ¶
func GetDefaultConfig() (*types.Config, *types.ConfigSubModule)
GetDefaultConfig :
Types ¶
type Chain33Mock ¶
type Chain33Mock struct {
// contains filtered or unexported fields
}
Chain33Mock :
func NewWithConfig ¶
func NewWithConfig(cfg *types.Config, sub *types.ConfigSubModule, mockapi client.QueueProtocolAPI) *Chain33Mock
NewWithConfig :
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) 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) GetJSONC ¶
func (mock *Chain33Mock) GetJSONC() *jsonclient.JSONClient
GetJSONC :
func (*Chain33Mock) GetLastBlock ¶
func (mock *Chain33Mock) GetLastBlock() *types.Block
GetLastBlock :
func (*Chain33Mock) SendAndSign ¶
SendAndSign :
func (*Chain33Mock) SendAndSignNonce ¶
func (mock *Chain33Mock) SendAndSignNonce(priv crypto.PrivKey, hextx string, nonce int64) ([]byte, error)
SendAndSignNonce 用外部传入的nonce 重写nonce
func (*Chain33Mock) WaitHeight ¶
func (mock *Chain33Mock) WaitHeight(height int64) error
WaitHeight :
func (*Chain33Mock) WaitTx ¶
func (mock *Chain33Mock) WaitTx(hash []byte) (*rpctypes.TransactionDetail, error)
WaitTx :
Click to show internal directories.
Click to hide internal directories.