File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -264,12 +264,7 @@ def __call__(self,
264
264
'--nodekey' ,
265
265
help = (
266
266
"Hexadecimal encoded private key to use for the nodekey"
267
- )
268
- )
269
- chain_parser .add_argument (
270
- '--nodekey-path' ,
271
- help = (
272
- "The filesystem path to the file which contains the nodekey"
267
+ " or the filesystem path to the file which contains the nodekey"
273
268
)
274
269
)
275
270
Original file line number Diff line number Diff line change @@ -135,12 +135,11 @@ def construct_trinity_config_params(
135
135
if args .data_dir is not None :
136
136
yield 'data_dir' , args .data_dir
137
137
138
- if args .nodekey_path and args .nodekey :
139
- raise ValueError ("Cannot provide both nodekey_path and nodekey" )
140
- elif args .nodekey_path is not None :
141
- yield 'nodekey_path' , args .nodekey_path
142
- elif args .nodekey is not None :
143
- yield 'nodekey' , decode_hex (args .nodekey )
138
+ if args .nodekey is not None :
139
+ if os .path .isfile (args .nodekey ):
140
+ yield 'nodekey_path' , args .nodekey
141
+ else :
142
+ yield 'nodekey' , decode_hex (args .nodekey )
144
143
145
144
if args .sync_mode is not None :
146
145
yield 'sync_mode' , args .sync_mode
You can’t perform that action at this time.
0 commit comments