mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
cmd, eth: remove legacy whitelist flag and references to it
This commit is contained in:
parent
27b3a6087e
commit
ce92963555
4 changed files with 2 additions and 19 deletions
|
|
@ -96,7 +96,6 @@ var (
|
|||
utils.StateHistoryFlag,
|
||||
utils.LightKDFFlag,
|
||||
utils.EthRequiredBlocksFlag,
|
||||
utils.LegacyWhitelistFlag, // deprecated
|
||||
utils.CacheFlag,
|
||||
utils.CacheDatabaseFlag,
|
||||
utils.CacheTrieFlag,
|
||||
|
|
|
|||
|
|
@ -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, "=")
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue