Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorType(err error) protos.CoreMessage_ErrorType
- type AsyncMsgHandle
- type NetEvent
- func (t *NetEvent) GetBlock(ctx xctx.Context, request *protos.CoreMessage) (*protos.InternalBlock, error)
- func (t *NetEvent) PostTx(ctx xctx.Context, chain base.Chain, tx *protos.Transaction) error
- func (t *NetEvent) SendBlock(ctx xctx.Context, chain base.Chain, in *protos.InternalBlock) error
- func (t *NetEvent) Start()
- func (t *NetEvent) Stop()
- func (t *NetEvent) Subscriber() error
Constants ¶
View Source
const (
// 默认消息队列buf大小
DefMsgChanBufSize = 50000
)
Variables ¶
View Source
var ( // ErrBlockChainNameEmpty is returned when blockchain name is empty ErrBlockChainNameEmpty = errors.New("validation error: validatePostTx TxStatus.Bcname can't be null") // ErrTxNil is returned when tx is nil ErrTxNil = errors.New("validation error: validatePostTx TxStatus.Tx can't be null") // ErrBlockIDNil is returned when blockid is nil ErrBlockIDNil = errors.New("validation error: validateSendBlock Block.Blockid can't be null") // ErrBlockNil is returned when block is nil ErrBlockNil = errors.New("validation error: validateSendBlock Block.Block can't be null") // ErrTxInvalid is returned when tx invaild ErrTxInvalid = errors.New("validation error: tx info is invaild") )
Functions ¶
func ErrorType ¶
func ErrorType(err error) protos.CoreMessage_ErrorType
Types ¶
type NetEvent ¶
type NetEvent struct {
// contains filtered or unexported fields
}
func (*NetEvent) GetBlock ¶
func (t *NetEvent) GetBlock(ctx xctx.Context, request *protos.CoreMessage) (*protos.InternalBlock, error)
func (*NetEvent) Subscriber ¶
Click to show internal directories.
Click to hide internal directories.