cmd, eth: remove legacy whitelist flag and references to it

This commit is contained in:
Charlotte 2025-12-28 00:51:35 +00:00 committed by GitHub
parent 27b3a6087e
commit ce92963555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 2 additions and 19 deletions

View file

@ -96,7 +96,6 @@ var (
utils.StateHistoryFlag,
utils.LightKDFFlag,
utils.EthRequiredBlocksFlag,
utils.LegacyWhitelistFlag, // deprecated
utils.CacheFlag,
utils.CacheDatabaseFlag,
utils.CacheTrieFlag,

View file

@ -1593,14 +1593,6 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) {
requiredBlocks := ctx.String(EthRequiredBlocksFlag.Name)
if requiredBlocks == "" {
if ctx.IsSet(LegacyWhitelistFlag.Name) {
log.Warn("The flag --whitelist is deprecated and will be removed, please use --eth.requiredblocks")
requiredBlocks = ctx.String(LegacyWhitelistFlag.Name)
} else {
return
}
}
cfg.RequiredBlocks = make(map[uint64]common.Hash)
for _, entry := range strings.Split(requiredBlocks, ",") {
parts := strings.Split(entry, "=")

View file

@ -34,7 +34,6 @@ var ShowDeprecated = &cli.Command{
var DeprecatedFlags = []cli.Flag{
NoUSBFlag,
LegacyWhitelistFlag,
CacheTrieJournalFlag,
CacheTrieRejournalFlag,
LegacyDiscoveryV5Flag,
@ -58,13 +57,6 @@ var (
Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)",
Category: flags.DeprecatedCategory,
}
// Deprecated March 2022
LegacyWhitelistFlag = &cli.StringFlag{
Name: "whitelist",
Hidden: true,
Usage: "Comma separated block number-to-hash mappings to enforce (<number>=<hash>) (deprecated in favor of --eth.requiredblocks)",
Category: flags.DeprecatedCategory,
}
// Deprecated July 2023
CacheTrieJournalFlag = &cli.StringFlag{
Name: "cache.trie.journal",

View file

@ -898,9 +898,9 @@ func (f *TxFetcher) rescheduleTimeout(timer *mclock.Timer, trigger chan struct{}
}
// scheduleFetches starts a batch of retrievals for all available idle peers.
func (f *TxFetcher) scheduleFetches(timer *mclock.Timer, timeout chan struct{}, whitelist map[string]struct{}) {
func (f *TxFetcher) scheduleFetches(timer *mclock.Timer, timeout chan struct{}, allowlist map[string]struct{}) {
// Gather the set of peers we want to retrieve from (default to all)
actives := whitelist
actives := allowlist
if actives == nil {
actives = make(map[string]struct{})
for peer := range f.announces {