Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
4 changed files with 9 additions and 2 deletions
Showing only changes of commit 0559a9a61e - Show all commits

View File

@ -164,7 +164,7 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
} }
backend, eth := utils.RegisterEthService(stack, &cfg.Eth) backend, eth := utils.RegisterEthService(stack, &cfg.Eth)
// Warn users to migrate if they have a legacy freezer format. // Warn users to migrate if they have a legacy freezer format.
if eth != nil { if eth != nil && !ctx.GlobalIsSet(utils.IgnoreLegacyReceiptsFlag.Name) {
firstIdx := uint64(0) firstIdx := uint64(0)
// Hack to speed up check for mainnet because we know // Hack to speed up check for mainnet because we know
// the first non-empty block. // the first non-empty block.
@ -176,7 +176,8 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
if err != nil { if err != nil {
log.Error("Failed to check db for legacy receipts", "err", err) log.Error("Failed to check db for legacy receipts", "err", err)
} else if isLegacy { } else if isLegacy {
log.Warn("Database has receipts with a legacy format. Please run `geth db freezer-migrate`.") stack.Close()
utils.Fatalf("Database has receipts with a legacy format. Please run `geth db freezer-migrate`.")
} }
} }

View File

@ -151,6 +151,7 @@ var (
utils.GpoMaxGasPriceFlag, utils.GpoMaxGasPriceFlag,
utils.GpoIgnoreGasPriceFlag, utils.GpoIgnoreGasPriceFlag,
utils.MinerNotifyFullFlag, utils.MinerNotifyFullFlag,
utils.IgnoreLegacyReceiptsFlag,
configFileFlag, configFileFlag,
}, utils.NetworkFlags, utils.DatabasePathFlags) }, utils.NetworkFlags, utils.DatabasePathFlags)

View File

@ -227,6 +227,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
Flags: []cli.Flag{ Flags: []cli.Flag{
utils.SnapshotFlag, utils.SnapshotFlag,
utils.BloomFilterSizeFlag, utils.BloomFilterSizeFlag,
utils.IgnoreLegacyReceiptsFlag,
cli.HelpFlag, cli.HelpFlag,
}, },
}, },

View File

@ -566,6 +566,10 @@ var (
Name: "nocompaction", Name: "nocompaction",
Usage: "Disables db compaction after import", Usage: "Disables db compaction after import",
} }
IgnoreLegacyReceiptsFlag = cli.BoolFlag{
Name: "ignore-legacy-receipts",
Usage: "Geth will start up even if there are legacy receipts in freezer",
}
// RPC settings // RPC settings
IPCDisabledFlag = cli.BoolFlag{ IPCDisabledFlag = cli.BoolFlag{
Name: "ipcdisable", Name: "ipcdisable",