erigon-pulse/cmd/tester/interfaces.go
Alex Sharov d2286bff1c
Naive implementation of MGR P2P SubProtocol (#403)
* use NoValues cursor where possible

* add ctx

* fix broken logs

* rebase master

* rebase master

* simplify generators

* hack to measure space distribution

* naive epoch and chunking implementation

* make stateless loop cancelable

* make stateless loop cancelable

* remove one rlp layer

* eth64 protocol support - add forkId to status message
2020-03-25 15:40:30 +00:00

22 lines
541 B
Go

package main
import (
"math/big"
"github.com/ledgerwatch/turbo-geth/common"
"github.com/ledgerwatch/turbo-geth/core/forkid"
"github.com/ledgerwatch/turbo-geth/core/types"
)
type BlockFeeder interface {
Close()
GetHeaderByHash(hash common.Hash) *types.Header
GetHeaderByNumber(number uint64) *types.Header
GetBlockByHash(hash common.Hash) (*types.Block, error)
GetBlockByNumber(number uint64) (*types.Block, error)
GetTdByNumber(number uint64) *big.Int
TotalDifficulty() *big.Int
LastBlock() *types.Block
ForkID() forkid.ID
}