Documentation
¶
Index ¶
- func DeserializeBlock(serializedBlock []byte) (*storePb.BlockWithRWSet, error)
- func DeserializeMeta(serializedBlock []byte) (*storePb.SerializedBlock, error)
- type BlockWithSerializedInfo
- func (b *BlockWithSerializedInfo) ReSet()
- func (b *BlockWithSerializedInfo) SerializeEventTopicTable(buf *proto.Buffer) error
- func (b *BlockWithSerializedInfo) SerializeMeta(buf *proto.Buffer) error
- func (b *BlockWithSerializedInfo) SerializeTxRWSets(buf *proto.Buffer) error
- func (b *BlockWithSerializedInfo) SerializeTxs(buf *proto.Buffer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeBlock ¶
func DeserializeBlock(serializedBlock []byte) (*storePb.BlockWithRWSet, error)
DeserializeBlock returns a deserialized block for given serialized bytes
func DeserializeMeta ¶
func DeserializeMeta(serializedBlock []byte) (*storePb.SerializedBlock, error)
反序列化 meta 数据
Types ¶
type BlockWithSerializedInfo ¶
type BlockWithSerializedInfo struct {
Block *commonPb.Block
Meta *storePb.SerializedBlock //Block without Txs
SerializedMeta []byte
Txs []*commonPb.Transaction
SerializedTxs [][]byte
TxRWSets []*commonPb.TxRWSet
SerializedTxRWSets [][]byte
ContractEvents []*commonPb.ContractEvent
SerializedContractEvents [][]byte
//整个Block+RWSet序列化后存储的位置
Index *storePb.StoreInfo
//Block基本信息(storePb.SerializedBlock)序列化后存储的位置
MetaIndex *storePb.StoreInfo
//交易列表序列化后的存储位置
TxsIndex []*storePb.StoreInfo
//读写集序列化后存储的位置
RWSetsIndex []*storePb.StoreInfo
}
BlockWithSerializedInfo contains block,txs and corresponding serialized data
func SerializeBlock ¶
func SerializeBlock(blockWithRWSet *storePb.BlockWithRWSet) ([]byte, *BlockWithSerializedInfo, error)
SerializeBlock serialized a BlockWithRWSet and return serialized data which combined as a BlockWithSerializedInfo
func (*BlockWithSerializedInfo) ReSet ¶
func (b *BlockWithSerializedInfo) ReSet()
为sync.pool 重置 BlockWithSerializedInfo 状态时使用
func (*BlockWithSerializedInfo) SerializeEventTopicTable ¶
func (b *BlockWithSerializedInfo) SerializeEventTopicTable(buf *proto.Buffer) error
序列化ContractEvents信息
func (*BlockWithSerializedInfo) SerializeMeta ¶
func (b *BlockWithSerializedInfo) SerializeMeta(buf *proto.Buffer) error
序列化meta信息,主要包括 header,dag,txids,additionalData数据
func (*BlockWithSerializedInfo) SerializeTxRWSets ¶
func (b *BlockWithSerializedInfo) SerializeTxRWSets(buf *proto.Buffer) error
序列化读写集
func (*BlockWithSerializedInfo) SerializeTxs ¶
func (b *BlockWithSerializedInfo) SerializeTxs(buf *proto.Buffer) error
序列化txs信息
Click to show internal directories.
Click to hide internal directories.