Skip to content

Commit c7f70cc

Browse files
authored
Merge pull request #332 from meshplus/fix/delete-register-service-ordered-param-1-18
fix(cmd): delete the ordered parameter when registering the service because it should always be true
2 parents ad58c71 + 008235a commit c7f70cc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

cmd/pier/service.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ var serviceCommand = cli.Command{
4747
Value: "CallContract",
4848
Required: false,
4949
},
50-
cli.BoolFlag{
51-
Name: "ordered",
52-
Usage: "Specify if the service should be ordered",
53-
},
5450
cli.StringFlag{
5551
Name: "permit",
5652
Usage: "Specify contracts which are not allowed to invoke the service. If there are multiple contract addresses, separate them with ','",
@@ -342,7 +338,6 @@ func registerService(ctx *cli.Context) error {
342338
name := ctx.String("name")
343339
typ := ctx.String("type")
344340
intro := ctx.String("intro")
345-
ordered := ctx.Bool("ordered")
346341
permit := ctx.String("permit")
347342
details := ctx.String("details")
348343
reason := ctx.String("reason")
@@ -357,10 +352,6 @@ func registerService(ctx *cli.Context) error {
357352
return err
358353
}
359354
// init method registry with this admin key
360-
orderedTmp := 0
361-
if ordered {
362-
orderedTmp = 1
363-
}
364355
receipt, err := client.InvokeBVMContract(
365356
constant.ServiceMgrContractAddr.Address(),
366357
"RegisterService", nil,
@@ -369,7 +360,7 @@ func registerService(ctx *cli.Context) error {
369360
rpcx.String(name),
370361
rpcx.String(typ),
371362
rpcx.String(intro),
372-
rpcx.Uint64(uint64(orderedTmp)),
363+
rpcx.Uint64(1),
373364
rpcx.String(permit),
374365
rpcx.String(details),
375366
rpcx.String(reason),

0 commit comments

Comments
 (0)