Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar
Commits
f4f2b289
Commit
f4f2b289
authored
Sep 10, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename word
parent
3f99c74f
Pipeline
#7973
failed with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
appchain_bxh.go
cmd/sidecar/appchain_bxh.go
+3
-3
appchain.go
cmd/sidecar/client/appchain.go
+1
-1
did.go
cmd/sidecar/did.go
+1
-1
id.go
cmd/sidecar/id.go
+1
-1
repo.go
internal/repo/repo.go
+3
-3
No files found.
cmd/sidecar/appchain_bxh.go
View file @
f4f2b289
...
@@ -378,7 +378,7 @@ func loadClient(keyPath string, grpcAddrs []string, ctx *cli.Context) (rpcx.Clie
...
@@ -378,7 +378,7 @@ func loadClient(keyPath string, grpcAddrs []string, ctx *cli.Context) (rpcx.Clie
return
nil
,
fmt
.
Errorf
(
"init config error: %s"
,
err
)
return
nil
,
fmt
.
Errorf
(
"init config error: %s"
,
err
)
}
}
privateKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
privateKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -401,7 +401,7 @@ func loadClient(keyPath string, grpcAddrs []string, ctx *cli.Context) (rpcx.Clie
...
@@ -401,7 +401,7 @@ func loadClient(keyPath string, grpcAddrs []string, ctx *cli.Context) (rpcx.Clie
}
}
func
getPubKey
(
keyPath
string
)
(
string
,
error
)
{
func
getPubKey
(
keyPath
string
)
(
string
,
error
)
{
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
}
}
...
@@ -414,7 +414,7 @@ func getPubKey(keyPath string) (string, error) {
...
@@ -414,7 +414,7 @@ func getPubKey(keyPath string) (string, error) {
}
}
func
getAddr
(
keyPath
string
)
(
string
,
error
)
{
func
getAddr
(
keyPath
string
)
(
string
,
error
)
{
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
}
}
...
...
cmd/sidecar/client/appchain.go
View file @
f4f2b289
...
@@ -296,7 +296,7 @@ func getSidecarAppchain(ctx *cli.Context) error {
...
@@ -296,7 +296,7 @@ func getSidecarAppchain(ctx *cli.Context) error {
}
}
func
getPubKey
(
keyPath
string
)
(
crypto
.
PublicKey
,
error
)
{
func
getPubKey
(
keyPath
string
)
(
crypto
.
PublicKey
,
error
)
{
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
cmd/sidecar/did.go
View file @
f4f2b289
...
@@ -171,7 +171,7 @@ func initClientWithKeyPath(ctx *cli.Context, chainAdminKeyPath string) (rpcx.Cli
...
@@ -171,7 +171,7 @@ func initClientWithKeyPath(ctx *cli.Context, chainAdminKeyPath string) (rpcx.Cli
return
nil
,
nil
,
fmt
.
Errorf
(
"init config error: %s"
,
err
)
return
nil
,
nil
,
fmt
.
Errorf
(
"init config error: %s"
,
err
)
}
}
adminPriv
,
err
:=
asym
.
RestorePrivateKey
(
chainAdminKeyPath
,
"
bitxhub
"
)
adminPriv
,
err
:=
asym
.
RestorePrivateKey
(
chainAdminKeyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
...
...
cmd/sidecar/id.go
View file @
f4f2b289
...
@@ -20,7 +20,7 @@ var idCMD = cli.Command{
...
@@ -20,7 +20,7 @@ var idCMD = cli.Command{
keyPath
:=
filepath
.
Join
(
repoRoot
,
"key.json"
)
keyPath
:=
filepath
.
Join
(
repoRoot
,
"key.json"
)
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
privKey
,
err
:=
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
internal/repo/repo.go
View file @
f4f2b289
...
@@ -42,13 +42,13 @@ const (
...
@@ -42,13 +42,13 @@ const (
NodeKeyName
=
"node.priv"
NodeKeyName
=
"node.priv"
// KeyPassword
// KeyPassword
KeyPassword
=
"
bitxhub
"
KeyPassword
=
"
link33
"
// API name
// API name
APIName
=
"api"
APIName
=
"api"
// Bitxhub type
// Bitxhub type
BitxhubType
=
"
bitxhub
"
BitxhubType
=
"
link33
"
)
)
var
RootPath
string
var
RootPath
string
...
@@ -166,7 +166,7 @@ func NodeKeyPath(repoRoot string) string {
...
@@ -166,7 +166,7 @@ func NodeKeyPath(repoRoot string) string {
func
LoadPrivateKey
(
repoRoot
string
)
(
crypto
.
PrivateKey
,
error
)
{
func
LoadPrivateKey
(
repoRoot
string
)
(
crypto
.
PrivateKey
,
error
)
{
keyPath
:=
filepath
.
Join
(
repoRoot
,
KeyName
)
keyPath
:=
filepath
.
Join
(
repoRoot
,
KeyName
)
return
asym
.
RestorePrivateKey
(
keyPath
,
"
bitxhub
"
)
return
asym
.
RestorePrivateKey
(
keyPath
,
"
link33
"
)
}
}
func
GetAPI
(
repoRoot
string
)
(
string
,
error
)
{
func
GetAPI
(
repoRoot
string
)
(
string
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment