Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added WatchTheBurnStage + erigon_watchTheBurn json rpc call #3137

Merged
merged 11 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
stage issuance
  • Loading branch information
Giulio2002 committed Dec 16, 2021
commit 14149d451889dea147887e29145f6d6a6ad6e2dd
6 changes: 2 additions & 4 deletions eth/stagedsync/stage_issuance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import (
type IssuanceCfg struct {
db kv.RwDB
chainConfig *params.ChainConfig
issuance bool
}

func StageIssuanceCfg(db kv.RwDB, chainConfig *params.ChainConfig, issuance bool) IssuanceCfg {
func StageIssuanceCfg(db kv.RwDB, chainConfig *params.ChainConfig) IssuanceCfg {
return IssuanceCfg{
db: db,
chainConfig: chainConfig,
issuance: issuance,
}
}

Expand All @@ -46,7 +44,7 @@ func SpawnStageIssuance(cfg IssuanceCfg, s *StageState, tx kv.RwTx, ctx context.
return fmt.Errorf("getting headers progress: %w", err)
}

if !cfg.issuance || cfg.chainConfig.Consensus != params.EtHashConsensus {
if cfg.chainConfig.Consensus != params.EtHashConsensus {
if err = s.Update(tx, headNumber); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion turbo/stages/mock_sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func MockWithEverything(t *testing.T, gspec *core.Genesis, key *ecdsa.PrivateKey
cfg.BatchSize,
allSnapshots,
blockReader,
), stagedsync.StageIssuanceCfg(mock.DB, mock.ChainConfig, false),
), stagedsync.StageIssuanceCfg(mock.DB, mock.ChainConfig),
stagedsync.StageDifficultyCfg(mock.DB, mock.tmpdir, nil, blockReader),
stagedsync.StageSendersCfg(mock.DB, mock.ChainConfig, mock.tmpdir, prune, allSnapshots),
stagedsync.StageExecuteBlocksCfg(
Expand Down
2 changes: 1 addition & 1 deletion turbo/stages/stageloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func NewStagedSync(
cfg.BatchSize,
allSnapshots,
blockReader,
), stagedsync.StageIssuanceCfg(db, controlServer.ChainConfig, true), stagedsync.StageDifficultyCfg(db, tmpdir, terminalTotalDifficulty, blockReader), stagedsync.StageSendersCfg(db, controlServer.ChainConfig, tmpdir, cfg.Prune, allSnapshots), stagedsync.StageExecuteBlocksCfg(
), stagedsync.StageIssuanceCfg(db, controlServer.ChainConfig), stagedsync.StageDifficultyCfg(db, tmpdir, terminalTotalDifficulty, blockReader), stagedsync.StageSendersCfg(db, controlServer.ChainConfig, tmpdir, cfg.Prune, allSnapshots), stagedsync.StageExecuteBlocksCfg(
db,
cfg.Prune,
cfg.BatchSize,
Expand Down