cmd/utils: follow the datadir path

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-10-09 14:01:49 +00:00
parent 4434213657
commit 854b9f9113

View file

@ -1885,6 +1885,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
var alloc core.GenesisAlloc var alloc core.GenesisAlloc
if allocPath := ctx.Path(DeveloperAllocFlag.Name); allocPath != "" { if allocPath := ctx.Path(DeveloperAllocFlag.Name); allocPath != "" {
allocPath = stack.ResolvePath(allocPath)
data, err := os.ReadFile(allocPath) data, err := os.ReadFile(allocPath)
if err != nil { if err != nil {
Fatalf("Failed to read developer genesis alloc file: %v", err) Fatalf("Failed to read developer genesis alloc file: %v", err)