Skip to content

Commit 5f1619c

Browse files
author
Sandy Zhou
authored
Merge pull request #212 from meshplus/fix/adapt-to-bitxhub-1-10
fix(*): fix bugs that do not fit the BitXHub version
2 parents 1af6737 + 491457a commit 5f1619c

File tree

5 files changed

+43
-236
lines changed

5 files changed

+43
-236
lines changed

cmd/pier/did.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,16 @@ func registerMethod(ctx *cli.Context) error {
9898
if err != nil {
9999
return fmt.Errorf("get public key: %w", err)
100100
}
101-
client, address, err := initClientWithKeyPath(ctx, chainAdminKeyPath)
101+
client, _, err := initClientWithKeyPath(ctx, chainAdminKeyPath)
102102
if err != nil {
103103
return err
104104
}
105-
appchainAdminDID := fmt.Sprintf("%s:%s:%s", bitxhubRootPrefix, method, address.String())
106105
appchainMethod := fmt.Sprintf("%s:%s:.", bitxhubRootPrefix, method)
107106
// init method registry with this admin key
108107
receipt, err := client.InvokeBVMContract(
109108
constant.AppchainMgrContractAddr.Address(),
110109
"Register", nil,
111-
rpcx.String(appchainAdminDID), rpcx.String(appchainMethod),
110+
rpcx.String(appchainMethod),
112111
rpcx.String(didDocAddr), rpcx.String(didDocHash),
113112
rpcx.String(string(validatorData)), rpcx.String(consensus), rpcx.String(typ),
114113
rpcx.String(name), rpcx.String(desc), rpcx.String(version),

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ require (
1919
github.com/lestrrat-go/strftime v1.0.3 // indirect
2020
github.com/libp2p/go-libp2p-core v0.6.1
2121
github.com/meshplus/bitxhub-core v1.3.1-0.20210524071255-789fd9ab501c
22-
github.com/meshplus/bitxhub-kit v1.2.1-0.20210524063043-9afae78ac098
23-
github.com/meshplus/bitxhub-model v1.2.1-0.20210524063354-5d48e2fee178
22+
github.com/meshplus/bitxhub-kit v1.2.1-0.20210616114532-4849447f09e1
23+
github.com/meshplus/bitxhub-model v1.2.1-0.20210629020432-d98febd566c1
2424
github.com/meshplus/bitxid v0.0.0-20210412025850-e0eaf0f9063a
25-
github.com/meshplus/go-bitxhub-client v1.3.0
25+
github.com/meshplus/go-bitxhub-client v1.3.1-0.20210701063659-a0836fbc1c78
2626
github.com/meshplus/go-lightp2p v0.0.0-20200817105923-6b3aee40fa54
2727
github.com/mitchellh/go-homedir v1.1.0
2828
github.com/multiformats/go-multiaddr v0.3.0

0 commit comments

Comments
 (0)