Skip to content

Commit a133f62

Browse files
committed
fix panic
1 parent f99df51 commit a133f62

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

local/snapshot.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ func (ln *localNetwork) loadSnapshot(
331331
}
332332
ln.subnetID2ElasticSubnetID[subnetID] = elasticSubnetID
333333
}
334-
ln.blockchainAliases = networkState.BlockchainAliases
334+
for k, v := range networkState.BlockchainAliases {
335+
ln.blockchainAliases[k] = v
336+
}
335337
}
336338
if err := ln.loadConfig(ctx, networkConfig); err != nil {
337339
return err

utils/utils.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io/fs"
88
"os"
9+
"path/filepath"
910
"time"
1011

1112
rpcb "github.com/ava-labs/avalanche-network-runner/rpcpb"
@@ -90,7 +91,7 @@ func CheckPluginPath(pluginExec string) error {
9091
var err error
9192
if _, err = os.Stat(pluginExec); err != nil {
9293
if errors.Is(err, fs.ErrNotExist) {
93-
return ErrNotExistsPlugin
94+
return fmt.Errorf("%s: %w", filepath.Base(pluginExec), ErrNotExistsPlugin)
9495
}
9596
return fmt.Errorf("failed to stat plugin exec %q (%w)", pluginExec, err)
9697
}

0 commit comments

Comments
 (0)