Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
add syncmode
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Apr 8, 2024
1 parent 53be0ce commit c49836f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/flags/driver.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package flags

import (
"errors"
"fmt"
"time"

"github.com/ethereum/go-ethereum/eth/downloader"
Expand All @@ -16,8 +16,9 @@ var (
Value: "snap",
Category: driverCategory,
Action: func(_ *cli.Context, s string) error {
if s != downloader.SnapSync.String() && s != downloader.FullSync.String() {
return errors.New("invalid sync mode")
if s != downloader.SnapSync.String() &&
s != downloader.FullSync.String() {
return fmt.Errorf("invalid sync mode: %s", s)
}
return nil
},
Expand Down

0 comments on commit c49836f

Please sign in to comment.