Documentation ¶
Index ¶
- Variables
- type SignalType
- type TxBatch
- func (*TxBatch) Descriptor() ([]byte, []int)
- func (m *TxBatch) GetBatchId() int32
- func (m *TxBatch) GetNodeId() string
- func (m *TxBatch) GetSize_() int32
- func (m *TxBatch) GetTxIdsMap() map[string]int32
- func (m *TxBatch) GetTxs() []*common.Transaction
- func (m *TxBatch) Marshal() (dAtA []byte, err error)
- func (m *TxBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *TxBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxBatch) ProtoMessage()
- func (m *TxBatch) Reset()
- func (m *TxBatch) Size() (n int)
- func (m *TxBatch) String() string
- func (m *TxBatch) Unmarshal(dAtA []byte) error
- func (m *TxBatch) XXX_DiscardUnknown()
- func (m *TxBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxBatch) XXX_Merge(src proto.Message)
- func (m *TxBatch) XXX_Size() int
- func (m *TxBatch) XXX_Unmarshal(b []byte) error
- type TxPoolSignal
- func (*TxPoolSignal) Descriptor() ([]byte, []int)
- func (m *TxPoolSignal) GetChainId() string
- func (m *TxPoolSignal) GetSignalType() SignalType
- func (m *TxPoolSignal) Marshal() (dAtA []byte, err error)
- func (m *TxPoolSignal) MarshalTo(dAtA []byte) (int, error)
- func (m *TxPoolSignal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxPoolSignal) ProtoMessage()
- func (m *TxPoolSignal) Reset()
- func (m *TxPoolSignal) Size() (n int)
- func (m *TxPoolSignal) String() string
- func (m *TxPoolSignal) Unmarshal(dAtA []byte) error
- func (m *TxPoolSignal) XXX_DiscardUnknown()
- func (m *TxPoolSignal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxPoolSignal) XXX_Merge(src proto.Message)
- func (m *TxPoolSignal) XXX_Size() int
- func (m *TxPoolSignal) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthTransactionPool = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTransactionPool = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTransactionPool = fmt.Errorf("proto: unexpected end of group") )
View Source
var SignalType_name = map[int32]string{
0: "NO_EVENT",
1: "TRANSACTION_INCOME",
2: "BLOCK_PROPOSE",
}
View Source
var SignalType_value = map[string]int32{
"NO_EVENT": 0,
"TRANSACTION_INCOME": 1,
"BLOCK_PROPOSE": 2,
}
Functions ¶
This section is empty.
Types ¶
type SignalType ¶
type SignalType int32
SignalType 是交易事件类型
const ( // 没有交易 SignalType_NO_EVENT SignalType = 0 // 新交易 SignalType_TRANSACTION_INCOME SignalType = 1 // 打包块 SignalType_BLOCK_PROPOSE SignalType = 2 )
func (SignalType) EnumDescriptor ¶
func (SignalType) EnumDescriptor() ([]byte, []int)
func (SignalType) String ¶
func (x SignalType) String() string
type TxBatch ¶
type TxBatch struct { // 批次编号 BatchId int32 `protobuf:"varint,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` // 批量交易由节点广播 NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // 批次大小 Size_ int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // 交易列表 Txs []*common.Transaction `protobuf:"bytes,4,rep,name=txs,proto3" json:"txs,omitempty"` // map:交易ID映射记录(key:交易ID,value:tcs中的交易索引) TxIdsMap map[string]int32 `` /* 176-byte string literal not displayed */ }
事务批处理,用于高效添加事务
func (*TxBatch) Descriptor ¶
func (*TxBatch) GetBatchId ¶
func (*TxBatch) GetTxIdsMap ¶
func (*TxBatch) GetTxs ¶
func (m *TxBatch) GetTxs() []*common.Transaction
func (*TxBatch) MarshalToSizedBuffer ¶
func (*TxBatch) ProtoMessage ¶
func (*TxBatch) ProtoMessage()
func (*TxBatch) XXX_DiscardUnknown ¶
func (m *TxBatch) XXX_DiscardUnknown()
func (*TxBatch) XXX_Marshal ¶
func (*TxBatch) XXX_Unmarshal ¶
type TxPoolSignal ¶
type TxPoolSignal struct { // 交易事件类型 SignalType SignalType `protobuf:"varint,1,opt,name=signal_type,json=signalType,proto3,enum=txpool.SignalType" json:"signal_type,omitempty"` // chain id ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` }
TxPoolSignal 被 tx pool 用来向区块提议者发送信号
func (*TxPoolSignal) Descriptor ¶
func (*TxPoolSignal) Descriptor() ([]byte, []int)
func (*TxPoolSignal) GetChainId ¶
func (m *TxPoolSignal) GetChainId() string
func (*TxPoolSignal) GetSignalType ¶
func (m *TxPoolSignal) GetSignalType() SignalType
func (*TxPoolSignal) Marshal ¶
func (m *TxPoolSignal) Marshal() (dAtA []byte, err error)
func (*TxPoolSignal) MarshalToSizedBuffer ¶
func (m *TxPoolSignal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxPoolSignal) ProtoMessage ¶
func (*TxPoolSignal) ProtoMessage()
func (*TxPoolSignal) Reset ¶
func (m *TxPoolSignal) Reset()
func (*TxPoolSignal) Size ¶
func (m *TxPoolSignal) Size() (n int)
func (*TxPoolSignal) String ¶
func (m *TxPoolSignal) String() string
func (*TxPoolSignal) Unmarshal ¶
func (m *TxPoolSignal) Unmarshal(dAtA []byte) error
func (*TxPoolSignal) XXX_DiscardUnknown ¶
func (m *TxPoolSignal) XXX_DiscardUnknown()
func (*TxPoolSignal) XXX_Marshal ¶
func (m *TxPoolSignal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxPoolSignal) XXX_Merge ¶
func (m *TxPoolSignal) XXX_Merge(src proto.Message)
func (*TxPoolSignal) XXX_Size ¶
func (m *TxPoolSignal) XXX_Size() int
func (*TxPoolSignal) XXX_Unmarshal ¶
func (m *TxPoolSignal) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.