message

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 4 Imported by: 28

Documentation

Index

Constants

View Source
const AccountsSvc = "AccountsSvc"
View Source
const ChainSvc = "ChainSvc"
View Source
const MemPoolSvc = "MemPoolSvc"

MemPoolSvc is exported name for MemPool service

View Source
const P2PSvc = "p2pSvc"
View Source
const RPCSvc = "RPCSvc"
View Source
const RestSvc = "RestSvc"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRsp

type AccountRsp struct {
	Account *types.Account
	Err     error
}

type AddBlock

type AddBlock struct {
	PeerID peer.ID
	Block  *types.Block
	Bstate interface{}
}

type AddBlockRsp

type AddBlockRsp struct {
	BlockNo   types.BlockNo
	BlockHash []byte
	Err       error
}

type BlockHash

type BlockHash []byte

type BlockHeadersResponse

type BlockHeadersResponse struct {
	Hashes  []BlockHash
	Headers []*types.BlockHeader
}

BlockHeadersResponse is data from other peer, as a response of types.GetBlockRequest p2p module will send this to chainservice actor.

type BlockInfosResponse

type BlockInfosResponse struct {
	Blocks []*types.Block
}

BlockInfosResponse is data from other peer, as a response of types.GetBlockRequest p2p module will send this to chainservice actor.

type CreateAccount

type CreateAccount struct {
	Passphrase string
}

type CreateAccountRsp

type CreateAccountRsp struct {
	Account *types.Account
}

type ExportAccount

type ExportAccount struct {
	Account *types.Account
	Pass    string
}

type ExportAccountRsp

type ExportAccountRsp struct {
	Wif []byte
	Err error
}

type GetABI

type GetABI struct {
	Contract []byte
}

type GetABIRsp

type GetABIRsp struct {
	ABI *types.ABI
	Err error
}

type GetAccounts

type GetAccounts struct{}

type GetAccountsRsp

type GetAccountsRsp struct {
	Accounts *types.AccountList
}

type GetAddressesMsg

type GetAddressesMsg struct {
	ToWhom peer.ID
	Size   uint32
	Offset uint32
}

GetAddressesMsg send types.AddressesRequest to dest peer. the dest peer will send types.AddressesResponse. The actor returns true if sending is successful.

type GetBestBlock

type GetBestBlock struct{}

type GetBestBlockNo

type GetBestBlockNo struct{}

type GetBestBlockNoRsp

type GetBestBlockNoRsp struct {
	BlockNo types.BlockNo
}

type GetBestBlockRsp

type GetBestBlockRsp GetBlockRsp

type GetBlock

type GetBlock struct {
	BlockHash []byte
}

type GetBlockByNo

type GetBlockByNo struct {
	BlockNo types.BlockNo
}

type GetBlockByNoRsp

type GetBlockByNoRsp GetBlockRsp

type GetBlockHeaders

type GetBlockHeaders struct {
	ToWhom peer.ID
	// Hash is the first block to get. Height will be used when Hash mi empty
	Hash    BlockHash
	Height  uint64
	Asc     bool
	Offset  uint64
	MaxSize uint32
}

GetBlockHeaders send type.GetBlockRequest to dest peer The actor returns true if sending is successful.

type GetBlockInfos

type GetBlockInfos struct {
	ToWhom peer.ID
	Hashes []BlockHash
}

GetBlockInfos send types.GetBlockRequest to dest peer. The actor returns true if sending is successful.

type GetBlockRsp

type GetBlockRsp struct {
	Block *types.Block
	Err   error
}

type GetElected

type GetElected struct {
	N int
}

GetElected is request to get voting result about top N elect

type GetMissing

type GetMissing struct {
	Hashes   [][]byte
	StopHash []byte
}

type GetMissingBlocks

type GetMissingBlocks struct {
	ToWhom peer.ID
	Hashes []BlockHash
}

GetMissingBlocks send types.GetMissingRequest to dest peer. The actor returns true if sending is successful. Not used (need to be async operation)

type GetMissingRsp

type GetMissingRsp struct {
	TopMatched BlockHash
	TopNumber  types.BlockNo
	StopNumber types.BlockNo
}

type GetPeers

type GetPeers struct {
}

GetPeers requests p2p actor to get remote peers that is connected. The actor returns *GetPeersRsp

type GetPeersRsp

type GetPeersRsp struct {
	Peers []*types.PeerAddress
	// last received block notice
	LastBlks []*types.NewBlockNotice
	States   []types.PeerState
}

GetPeersRsp contains peer meta information and current states.

type GetQuery

type GetQuery struct {
	Contract  []byte
	Queryinfo []byte
}

type GetQueryRsp

type GetQueryRsp struct {
	Result []byte
	Err    error
}

type GetReceipt

type GetReceipt struct {
	TxHash []byte
}

type GetReceiptRsp

type GetReceiptRsp struct {
	Receipt *types.Receipt
	Err     error
}

type GetState

type GetState struct {
	Account []byte
}

type GetStateAndProof

type GetStateAndProof struct {
	Account []byte
	Root    []byte
}

type GetStateAndProofRsp

type GetStateAndProofRsp struct {
	StateProof *types.StateProof
	Err        error
}

type GetStateRsp

type GetStateRsp struct {
	State *types.State
	Err   error
}

type GetTransactions

type GetTransactions struct {
	ToWhom peer.ID
	Hashes []TXHash
}

GetTransactions send types.GetTransactionsRequest to dest peer. The receiving peer will send types.GetTransactionsResponse The actor returns true if sending is successful.

type GetTx

type GetTx struct {
	TxHash []byte
}

type GetTxRsp

type GetTxRsp struct {
	Tx    *types.Tx
	TxIds *types.TxIdx
	Err   error
}

type GetVote

type GetVote struct {
	Addr []byte
}

type GetVoteRsp

type GetVoteRsp struct {
	Top *types.VoteList
	Err error
}

GetElectedRsp is return to get voting result

type Helper

type Helper interface {
	// ExtractBlockFromResponseAndError get rawResponse and error and return pointer of Block
	ExtractBlockFromResponseAndError(rawResponse interface{}, err error) (*types.Block, error)
	ExtractBlockFromResponse(rawResponse interface{}) (*types.Block, error)
	ExtractTxFromResponseAndError(rawResponse interface{}, err error) (*types.Tx, error)
	ExtractTxFromResponse(rawResponse interface{}) (*types.Tx, error)
	ExtractTxsFromResponseAndError(rawResponse interface{}, err error) ([]*types.Tx, error)
	ExtractTxsFromResponse(rawResponse interface{}) ([]*types.Tx, error)
}

Helper is helper interface for extracting tx or block from actor response

func GetHelper

func GetHelper() Helper

type ImportAccount

type ImportAccount struct {
	Wif     []byte
	OldPass string
	NewPass string
}

type ImportAccountRsp

type ImportAccountRsp struct {
	Account *types.Account
	Err     error
}

type LockAccount

type LockAccount struct {
	Account    *types.Account
	Passphrase string
}

type MemPoolDel

type MemPoolDel struct {
	Block *types.Block
}

MemPoolDel is interface of MemPool service for deleting transactions including given transactions

type MemPoolDelRsp

type MemPoolDelRsp struct {
	Err error
}

MemPoolDelRsp defines struct of result for MemPoolDel

type MemPoolExist

type MemPoolExist struct {
	Hash []byte
}

MemPoolExist is interface of MemPool service for retrieving transaction according to given hash

type MemPoolExistRsp

type MemPoolExistRsp struct {
	Tx *types.Tx
}

MemPoolExistRsp defines struct of result for MemPoolExist

type MemPoolGet

type MemPoolGet struct {
}

MemPoolGet is interface of MemPool service for retrieving transactions

type MemPoolGetRsp

type MemPoolGetRsp struct {
	Txs []*types.Tx
	Err error
}

MemPoolGetRsp defines struct of result for MemPoolGet

type MemPoolPut

type MemPoolPut struct {
	Tx *types.Tx
}

MemPoolPut is interface of MemPool service for inserting transactions

type MemPoolPutRsp

type MemPoolPutRsp struct {
	Err error
}

MemPoolPutRsp defines struct of result for MemPoolPut

type NotifyNewBlock

type NotifyNewBlock struct {
	BlockNo uint64
	Block   *types.Block
}

NotifyNewBlock send types.NewBlockNotice to other peers. The receiving peer will send GetBlockHeadersRequest or GetBlockRequest if needed. The actor returns true if sending is successful.

type NotifyNewTransactions

type NotifyNewTransactions struct {
	Txs []*types.Tx
}

NotifyNewTransactions send types.NewTransactionsNotice to other peers. The actor returns true if sending is successful.

type PingMsg

type PingMsg struct {
	ToWhom peer.ID
}

PingMsg send types.Ping to each peer. The actor returns true if sending is successful.

type SignTx

type SignTx struct {
	Tx *types.Tx
}

type SignTxRsp

type SignTxRsp struct {
	Tx  *types.Tx
	Err error
}

type SyncBlockState

type SyncBlockState struct {
	PeerID    peer.ID
	BlockNo   types.BlockNo
	BlockHash []byte
}

SyncBlockState is request to sync from remote peer. It returns sync result.

type TXHash

type TXHash []byte

type TransactionsResponse

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

TransactionsResponse is data from other peer, as a response of types.GetTransactionsRequest p2p module will send this to mempool actor.

type UnlockAccount

type UnlockAccount struct {
	Account    *types.Account
	Passphrase string
}

type VerifyTx

type VerifyTx struct {
	Tx *types.Tx
}

type VerifyTxRsp

type VerifyTxRsp struct {
	Tx  *types.Tx
	Err error
}

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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