Versions in this module Expand all Collapse all v1 v1.13.13 Aug 9, 2024 Changes in this version + var MaxEra1Size = 8192 + var TypeAccumulator uint16 = 0x07 + var TypeBlockIndex uint16 = 0x3266 + var TypeCompressedBody uint16 = 0x04 + var TypeCompressedHeader uint16 = 0x03 + var TypeCompressedReceipts uint16 = 0x05 + var TypeTotalDifficulty uint16 = 0x06 + var TypeVersion uint16 = 0x3265 + func ComputeAccumulator(hashes []common.Hash, tds []*big.Int) (common.Hash, error) + func Filename(network string, epoch int, root common.Hash) string + func ReadDir(dir, network string) ([]string, error) + type Builder struct + func NewBuilder(w io.Writer) *Builder + func (b *Builder) Add(block *types.Block, receipts types.Receipts, td *big.Int) error + func (b *Builder) AddRLP(header, body, receipts []byte, number uint64, hash common.Hash, ...) error + func (b *Builder) Finalize() (common.Hash, error) + type Era struct + func From(f ReadAtSeekCloser) (*Era, error) + func Open(filename string) (*Era, error) + func (e *Era) Accumulator() (common.Hash, error) + func (e *Era) Close() error + func (e *Era) Count() uint64 + func (e *Era) GetBlockByNumber(num uint64) (*types.Block, error) + func (e *Era) InitialTD() (*big.Int, error) + func (e *Era) Start() uint64 + type Iterator struct + func NewIterator(e *Era) (*Iterator, error) + func (it *Iterator) Block() (*types.Block, error) + func (it *Iterator) BlockAndReceipts() (*types.Block, types.Receipts, error) + func (it *Iterator) Error() error + func (it *Iterator) Next() bool + func (it *Iterator) Number() uint64 + func (it *Iterator) Receipts() (types.Receipts, error) + func (it *Iterator) TotalDifficulty() (*big.Int, error) + type RawIterator struct + Body io.Reader + Header io.Reader + Receipts io.Reader + TotalDifficulty io.Reader + func NewRawIterator(e *Era) (*RawIterator, error) + func (it *RawIterator) Error() error + func (it *RawIterator) Next() bool + func (it *RawIterator) Number() uint64 + type ReadAtSeekCloser interface