Skip to content

Commit fddb26b

Browse files
committed
fix: changed arguments
1 parent 6c4ff11 commit fddb26b

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

code/go/0chain.net/blobber/flags.go

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@ import (
66
)
77

88
var (
9-
deploymentMode int
10-
keysFile string
11-
keysFileRaw string
12-
keysFileIsSplit bool
13-
mountPoint string
14-
metadataDB string
15-
logDir string
16-
httpPort int
17-
hostname string
18-
configDir string
19-
grpcPort int
20-
httpsPort int
21-
httpsKeyFile string
22-
httpsCertFile string
23-
hostUrl string
9+
deploymentMode int
10+
keysFile string
11+
keysFilePublicKey string
12+
keysFilePrivateKey string
13+
keysFileIsSplit bool
14+
mountPoint string
15+
metadataDB string
16+
logDir string
17+
httpPort int
18+
hostname string
19+
configDir string
20+
grpcPort int
21+
httpsPort int
22+
httpsKeyFile string
23+
httpsCertFile string
24+
hostUrl string
2425
)
2526

2627
func init() {
2728
flag.IntVar(&deploymentMode, "deployment_mode", 2, "deployment mode: 0=dev,1=test, 2=mainnet")
2829
flag.StringVar(&keysFile, "keys_file", "", "keys_file")
29-
flag.StringVar(&keysFileRaw, "keys_file_raw", "", "keys_file_raw")
30+
flag.StringVar(&keysFilePublicKey, "keys_file_public_key", "", "keys_file_public_key")
31+
flag.StringVar(&keysFilePrivateKey, "keys_file_private_key", "", "keys_file_private_key")
3032
flag.BoolVar(&keysFileIsSplit, "keys_file_is_split", false, "keys_file_is_split")
3133
flag.StringVar(&mountPoint, "files_dir", "", "Mounted partition where all files will be stored")
3234
flag.StringVar(&metadataDB, "db_dir", "", "db_dir")

code/go/0chain.net/blobber/node.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ func setupNode() error {
2121

2222
var err error
2323

24-
if keysFileRaw != "" {
25-
err = readKeysFromString(&keysFileRaw)
24+
if keysFilePrivateKey != "" || keysFilePublicKey != "" {
25+
privateKey = keysFilePrivateKey
26+
publicKey = keysFilePublicKey
2627

2728
fmt.Println("using blobber keys from local string")
2829
} else {
@@ -39,6 +40,7 @@ func setupNode() error {
3940
}
4041

4142
node.Self.SetKeys(publicKey, privateKey, keysFileIsSplit)
43+
4244
if node.Self.ID == "" {
4345
return errors.New("node definition for self node doesn't exist")
4446
} else {

0 commit comments

Comments
 (0)