Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkReader ¶
type ChunkReader interface {
// Read a block, return io.EOF if reach end, the block maybe a accountBlock or a snapshotBlock
Read() (accountBlock *ledger.AccountBlock, snapshotBlock *ledger.SnapshotBlock, err error)
// Close the stream
Close() error
Size() int64
Verified() bool
Verify()
}
type LedgerReader ¶
type LedgerReader interface {
Seg() Segment
Size() int
io.ReadCloser
}
type Segment ¶
type SegmentList ¶
type SegmentList []Segment
func (SegmentList) Len ¶
func (list SegmentList) Len() int
func (SegmentList) Less ¶
func (list SegmentList) Less(i, j int) bool
func (SegmentList) Swap ¶
func (list SegmentList) Swap(i, j int)
type StateSnapshot ¶
type StateSnapshot interface {
// ====== balance ======
GetBalance(tokenId *types.TokenTypeId) (*big.Int, error)
// ====== Storage ======
GetValue([]byte) ([]byte, error)
NewStorageIterator(prefix []byte) StorageIterator
Release()
}
type StorageIterator ¶
type SyncCache ¶
type SyncCache interface {
NewWriter(segment Segment, size int64) (io.WriteCloser, error)
Chunks() SegmentList
NewReader(segment Segment) (ChunkReader, error)
Delete(seg Segment) error
Close() error
}
Source Files
¶
- chain.go
- consensus.go
Click to show internal directories.
Click to hide internal directories.