mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-29 07:07:16 +00:00
ecb10e8548
* save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * Squashed 'interfaces/' content from commit e5b1945d0 git-subtree-dir: interfaces git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184 * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save * save
31 lines
935 B
Go
31 lines
935 B
Go
package interfaces
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ledgerwatch/erigon-lib/kv"
|
|
"github.com/ledgerwatch/erigon/common"
|
|
"github.com/ledgerwatch/erigon/core/types"
|
|
"github.com/ledgerwatch/erigon/rlp"
|
|
)
|
|
|
|
type BlockReader interface {
|
|
BlockWithSenders(ctx context.Context, tx kv.Tx, hash common.Hash, blockHeight uint64) (block *types.Block, senders []common.Address, err error)
|
|
}
|
|
|
|
type HeaderReader interface {
|
|
Header(ctx context.Context, tx kv.Getter, hash common.Hash, blockHeight uint64) (*types.Header, error)
|
|
HeaderByNumber(ctx context.Context, tx kv.Getter, blockHeight uint64) (*types.Header, error)
|
|
}
|
|
|
|
type BodyReader interface {
|
|
Body(ctx context.Context, tx kv.Tx, hash common.Hash, blockHeight uint64) (body *types.Body, err error)
|
|
BodyRlp(ctx context.Context, tx kv.Tx, hash common.Hash, blockHeight uint64) (bodyRlp rlp.RawValue, err error)
|
|
}
|
|
|
|
type FullBlockReader interface {
|
|
BlockReader
|
|
BodyReader
|
|
HeaderReader
|
|
}
|