|
29 | 29 | from hathor.cli.run_node_args import RunNodeArgs
|
30 | 30 | from hathor.sysctl.runner import SysctlRunner
|
31 | 31 |
|
| 32 | +DEFAULT_CACHE_SIZE: int = 100000 |
| 33 | + |
32 | 34 |
|
33 | 35 | @contextmanager
|
34 | 36 | def temp_fifo(filename: str, tempdir: str | None) -> Iterator[None]:
|
@@ -116,8 +118,11 @@ def create_parser(cls) -> ArgumentParser:
|
116 | 118 | parser.add_argument('--prometheus', action='store_true', help='Send metric data to Prometheus')
|
117 | 119 | parser.add_argument('--prometheus-prefix', default='',
|
118 | 120 | help='A prefix that will be added in all Prometheus metrics')
|
119 |
| - parser.add_argument('--cache', action='store_true', help='Use cache for tx storage') |
120 |
| - parser.add_argument('--cache-size', type=int, help='Number of txs to keep on cache') |
| 121 | + cache_args = parser.add_mutually_exclusive_group() |
| 122 | + cache_args.add_argument('--cache', action='store_true', help=SUPPRESS) # moved to --disable-cache |
| 123 | + cache_args.add_argument('--disable-cache', action='store_false', help='Disable cache for tx storage') |
| 124 | + parser.add_argument('--cache-size', type=int, help='Number of txs to keep on cache', |
| 125 | + default=DEFAULT_CACHE_SIZE) |
121 | 126 | parser.add_argument('--cache-interval', type=int, help='Cache flush interval')
|
122 | 127 | parser.add_argument('--recursion-limit', type=int, help='Set python recursion limit')
|
123 | 128 | parser.add_argument('--allow-mining-without-peers', action='store_true', help='Allow mining without peers')
|
|
0 commit comments