|
|
@@ -299,13 +299,17 @@ func importChain(ctx *cli.Context) error {
|
|
|
// Import the chain
|
|
|
start := time.Now()
|
|
|
|
|
|
+ var importErr error
|
|
|
+
|
|
|
if len(ctx.Args()) == 1 {
|
|
|
if err := utils.ImportChain(chain, ctx.Args().First()); err != nil {
|
|
|
+ importErr = err
|
|
|
log.Error("Import error", "err", err)
|
|
|
}
|
|
|
} else {
|
|
|
for _, arg := range ctx.Args() {
|
|
|
if err := utils.ImportChain(chain, arg); err != nil {
|
|
|
+ importErr = err
|
|
|
log.Error("Import error", "file", arg, "err", err)
|
|
|
}
|
|
|
}
|
|
|
@@ -358,7 +362,7 @@ func importChain(ctx *cli.Context) error {
|
|
|
utils.Fatalf("Failed to read database iostats: %v", err)
|
|
|
}
|
|
|
fmt.Println(ioStats)
|
|
|
- return nil
|
|
|
+ return importErr
|
|
|
}
|
|
|
|
|
|
func exportChain(ctx *cli.Context) error {
|