From 409b16e5abac3a48c21142fdfa68d33cf6c95fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 8 Feb 2021 20:44:05 +0200 Subject: [PATCH] cmd/utils, eth/ethconfig: unindex txs older than ~1 year --- cmd/utils/flags.go | 6 +++--- eth/ethconfig/config.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index f9c555396..0d7b0e1bf 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -212,10 +212,10 @@ var ( Name: "snapshot", Usage: `Enables snapshot-database mode (default = enable)`, } - TxLookupLimitFlag = cli.Int64Flag{ + TxLookupLimitFlag = cli.Uint64Flag{ Name: "txlookuplimit", - Usage: "Number of recent blocks to maintain transactions index by-hash for (default = index all blocks)", - Value: 0, + Usage: "Number of recent blocks to maintain transactions index for (default = about one year, 0 = entire chain)", + Value: ethconfig.Defaults.TxLookupLimit, } LightKDFFlag = cli.BoolFlag{ Name: "lightkdf", diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 9147a602d..e192e4d33 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -66,6 +66,7 @@ var Defaults = Config{ DatasetsLockMmap: false, }, NetworkId: 1, + TxLookupLimit: 2350000, LightPeers: 100, UltraLightFraction: 75, DatabaseCache: 512,