core, eth: fix build

This commit is contained in:
Gary Rong 2025-03-25 18:05:19 +08:00
parent 2088be930a
commit c0bad8184f
2 changed files with 3 additions and 2 deletions

View file

@ -58,9 +58,10 @@ type txIndexer struct {
// newTxIndexer initializes the transaction indexer. // newTxIndexer initializes the transaction indexer.
func newTxIndexer(limit uint64, chain *BlockChain) *txIndexer { func newTxIndexer(limit uint64, chain *BlockChain) *txIndexer {
cutoff, _ := chain.HistoryPruningCutoff()
indexer := &txIndexer{ indexer := &txIndexer{
limit: limit, limit: limit,
cutoff: chain.HistoryPruningCutoff(), cutoff: cutoff,
db: chain.db, db: chain.db,
progress: make(chan chan TxIndexProgress), progress: make(chan chan TxIndexProgress),
term: make(chan chan struct{}), term: make(chan chan struct{}),

View file

@ -247,7 +247,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
} }
fmConfig := filtermaps.Config{History: config.LogHistory, Disabled: config.LogNoHistory, ExportFileName: config.LogExportCheckpoints} fmConfig := filtermaps.Config{History: config.LogHistory, Disabled: config.LogNoHistory, ExportFileName: config.LogExportCheckpoints}
chainView := eth.newChainView(eth.blockchain.CurrentBlock()) chainView := eth.newChainView(eth.blockchain.CurrentBlock())
historyCutoff := eth.blockchain.HistoryPruningCutoff() historyCutoff, _ := eth.blockchain.HistoryPruningCutoff()
var finalBlock uint64 var finalBlock uint64
if fb := eth.blockchain.CurrentFinalBlock(); fb != nil { if fb := eth.blockchain.CurrentFinalBlock(); fb != nil {
finalBlock = fb.Number.Uint64() finalBlock = fb.Number.Uint64()