erigon-pulse/cmd/rpcdaemon/interfaces/interfaces.go
2021-12-05 09:03:08 +07:00

24 lines
638 B
Go

package interfaces
import (
"context"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/core/types"
)
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 FullBlockReader interface {
BlockReader
HeaderReader
}