mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +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.StateHistoryFlag,
|
||||||
utils.LightKDFFlag,
|
utils.LightKDFFlag,
|
||||||
utils.EthRequiredBlocksFlag,
|
utils.EthRequiredBlocksFlag,
|
||||||
utils.LegacyWhitelistFlag, // deprecated
|
|
||||||
utils.CacheFlag,
|
utils.CacheFlag,
|
||||||
utils.CacheDatabaseFlag,
|
utils.CacheDatabaseFlag,
|
||||||
utils.CacheTrieFlag,
|
utils.CacheTrieFlag,
|
||||||
|
|
|
||||||
|
|
@ -1593,14 +1593,6 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
|
||||||
|
|
||||||
func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) {
|
func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) {
|
||||||
requiredBlocks := ctx.String(EthRequiredBlocksFlag.Name)
|
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)
|
cfg.RequiredBlocks = make(map[uint64]common.Hash)
|
||||||
for _, entry := range strings.Split(requiredBlocks, ",") {
|
for _, entry := range strings.Split(requiredBlocks, ",") {
|
||||||
parts := strings.Split(entry, "=")
|
parts := strings.Split(entry, "=")
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ var ShowDeprecated = &cli.Command{
|
||||||
|
|
||||||
var DeprecatedFlags = []cli.Flag{
|
var DeprecatedFlags = []cli.Flag{
|
||||||
NoUSBFlag,
|
NoUSBFlag,
|
||||||
LegacyWhitelistFlag,
|
|
||||||
CacheTrieJournalFlag,
|
CacheTrieJournalFlag,
|
||||||
CacheTrieRejournalFlag,
|
CacheTrieRejournalFlag,
|
||||||
LegacyDiscoveryV5Flag,
|
LegacyDiscoveryV5Flag,
|
||||||
|
|
@ -58,13 +57,6 @@ var (
|
||||||
Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)",
|
Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)",
|
||||||
Category: flags.DeprecatedCategory,
|
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
|
// Deprecated July 2023
|
||||||
CacheTrieJournalFlag = &cli.StringFlag{
|
CacheTrieJournalFlag = &cli.StringFlag{
|
||||||
Name: "cache.trie.journal",
|
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.
|
// 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)
|
// Gather the set of peers we want to retrieve from (default to all)
|
||||||
actives := whitelist
|
actives := allowlist
|
||||||
if actives == nil {
|
if actives == nil {
|
||||||
actives = make(map[string]struct{})
|
actives = make(map[string]struct{})
|
||||||
for peer := range f.announces {
|
for peer := range f.announces {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue