Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeIntermediateCIDs = iota CodeExecutionStateDiff )
View Source
const MAX_BLOCK_SIZE = 1e6 // 1MB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockWriter ¶
type BlockWriter struct {
// contains filtered or unexported fields
}
func (*BlockWriter) Flush ¶
func (bw *BlockWriter) Flush() error
func (*BlockWriter) GetWrittenCids ¶
func (bw *BlockWriter) GetWrittenCids() []cid.Cid
func (*BlockWriter) Reset ¶
func (bw *BlockWriter) Reset()
type ExecutionStateDiff ¶
type ExecutionStateDiff struct { Collections []*flow.Collection Events []*flow.Event TrieUpdate []*ledger.TrieUpdate TransactionResults []*flow.TransactionResult }
type StateDiffStorer ¶
type StateDiffStorer struct {
// contains filtered or unexported fields
}
func NewStateDiffStorer ¶
func NewStateDiffStorer( codec encoding.Codec, compressor network.Compressor, bstore blockstore.Blockstore, ) (*StateDiffStorer, error)
func (*StateDiffStorer) Load ¶
func (s *StateDiffStorer) Load(c cid.Cid) (*ExecutionStateDiff, error)
Load loads the ExecutionStateDiff represented by the given CID from the blockstore. Since blocks are limited to MAX_BLOCK_SIZE bytes, it's possible that the data was stored in multiple chunks, and hence the root CID may point to a block for which the data itself is a list of concatenated CIDs.
func (*StateDiffStorer) Store ¶
func (s *StateDiffStorer) Store(sd *ExecutionStateDiff) (cid.Cid, error)
Click to show internal directories.
Click to hide internal directories.