From c4453a2a3f27b845ab7391909bc61d3207b1cc78 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 26 Jul 2024 16:52:00 +0300 Subject: [PATCH 1/2] cli: fix dump command help, fix #3498 Signed-off-by: Roman Khimov --- cli/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/server/server.go b/cli/server/server.go index 882423405b..f2866863e4 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -100,7 +100,7 @@ func NewCommands() []*cli.Command { Subcommands: []*cli.Command{ { Name: "dump", - Usage: "Dump blocks (starting with block #1) to the file", + Usage: "Dump blocks (starting with the genesis or specified block) to the file", UsageText: "neo-go db dump [-o file] [-s start] [-c count] [--config-path path] [-p/-m/-t] [--config-file file]", Action: dumpDB, Flags: cfgCountOutFlags, From e5dd2b2ad63375fa6a3322a5bfc816087af68a8c Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 26 Jul 2024 17:07:04 +0300 Subject: [PATCH 2/2] cli: extend error message for restore failure, fix #3499 Signed-off-by: Roman Khimov --- cli/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/server/server.go b/cli/server/server.go index f2866863e4..67787ced9b 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -325,7 +325,7 @@ func restoreDB(ctx *cli.Context) error { err = chaindump.Restore(chain, reader, skip, count, f) if err != nil { - return cli.Exit(err, 1) + return cli.Exit(fmt.Errorf("wrong dump file or settings mismatch: %w", err), 1) } return nil }