mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
e4e36c152e
* interface * generalize interface * linters * fix deadlock * fix linters * close goroutine * fix * debug * id+ttl * refactor downloader tests * tests * lru * handle genesis, extract fake consensuses * fix fake consensus * test uncles, verify * after a new master * fmt * fix close * debug * debug * fix chain length * remove test field * use single account * fix data race on closing channel * remove postponed blocks queue * miner test * VerifyHeaderRequests * fmt * fmt * fix data race * handle validating errors * simplify matchParents * remove copy-paste * move sort to constructor * clean up * debug for 10 parents * debug * debug * batch responses * batch requests * works for many ancestors * remove debug * always Close an engine * linters * ancestors deduplication * fix test * reduce interface * api * clique * green clique sync * stable * perpermance per second * full sync * linters * gitignore * deps * fix panic after master merge * init consensus * clique tests * fix tests * fix tests * clean up * reuse snap * store vefified snapshots * optimize snapshots * safe close * cleanup loop * after downloader * downloader and consensus tests * update tests * hack.go * clique flags * fix cliuqe config * review * gitignore * remove additional bucket * blk/sec instead of blk/microsecond * rename * deps * optimize * debug * test * tests without extracted validation process * same base performance as on master * benchmark * simplify ethash verification * ethash * ethash * linters * ethash * master stats * cleanup * gomod * linters * tests * better locks * Fix * Remove logging for verifyHeaders * Verification speed in the logs * Fix compile error Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
36 lines
1.2 KiB
Go
36 lines
1.2 KiB
Go
package consensus
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/common"
|
|
"github.com/ledgerwatch/turbo-geth/core/types"
|
|
"github.com/ledgerwatch/turbo-geth/params"
|
|
)
|
|
|
|
// ChainHeaderReader defines a small collection of methods needed to access the local
|
|
// blockchain during header verification.
|
|
type ChainHeaderReader interface {
|
|
// Config retrieves the blockchain's chain configuration.
|
|
Config() *params.ChainConfig
|
|
|
|
// CurrentHeader retrieves the current header from the local chain.
|
|
CurrentHeader() *types.Header
|
|
|
|
// GetHeader retrieves a block header from the database by hash and number.
|
|
GetHeader(hash common.Hash, number uint64) *types.Header
|
|
|
|
// GetHeaderByNumber retrieves a block header from the database by number.
|
|
GetHeaderByNumber(number uint64) *types.Header
|
|
|
|
// GetHeaderByHash retrieves a block header from the database by its hash.
|
|
GetHeaderByHash(hash common.Hash) *types.Header
|
|
}
|
|
|
|
// ChainReader defines a small collection of methods needed to access the local
|
|
// blockchain during header and/or uncle verification.
|
|
type ChainReader interface {
|
|
ChainHeaderReader
|
|
|
|
// GetBlock retrieves a block from the database by hash and number.
|
|
GetBlock(hash common.Hash, number uint64) *types.Block
|
|
}
|