Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainReader ¶
type ChainReader interface {
// interface to reader utxos
ListAllUtxos() (map[types.OutPoint]*types.UtxoWrap, error)
// LoadUtxoByPubKeyScript([]byte) (map[types.OutPoint]*types.UtxoWrap, error)
LoadUtxoByAddress(types.Address) (map[types.OutPoint]*types.UtxoWrap, error)
// interface to read transactions
LoadTxByHash(crypto.HashType) (*types.Transaction, error)
//interface to reader block status
GetBlockHeight() uint32
GetBlockHash(uint32) (*crypto.HashType, error)
LoadBlockByHash(crypto.HashType) (*types.Block, error)
// address related search method
GetTransactionsByAddr(types.Address) ([]*types.Transaction, error)
}
ChainReader defines basic operations blockchain exposes
type Server ¶
type Server interface {
// Run a server
Run() error
// Stop the service. It is blocked unitl the server is down.
Stop()
// Proc returns the goprocess of server is running
Proc() goprocess.Process
}
Server defines methods to start/stop a server
type TxHandler ¶
type TxHandler interface {
ProcessTx(tx *types.Transaction, broadcast bool) error
// GetTransactionsInPool gets all transactions in memory pool
GetTransactionsInPool() []*types.Transaction
}
TxHandler defines basic operations txpool exposes
Click to show internal directories.
Click to hide internal directories.