Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
c7d696ba
Commit
c7d696ba
authored
Apr 02, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6a815d37
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
process.go
pkg/app/process.go
+14
-1
No files found.
pkg/app/process.go
View file @
c7d696ba
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"chain33-pai/service/pai_service"
"chain33-pai/service/pai_service"
"encoding/json"
"encoding/json"
"chain33-pai/pkg/chain33"
"chain33-pai/pkg/chain33"
types2
"github.com/33cn/plugin/plugin/dapp/ticket/types"
)
)
var
tlog
=
log
.
New
(
"pkg"
,
"app"
)
var
tlog
=
log
.
New
(
"pkg"
,
"app"
)
...
@@ -498,8 +499,20 @@ func Unlock() error{
...
@@ -498,8 +499,20 @@ func Unlock() error{
return
nil
return
nil
}
}
type
clientRequest
struct
{
Method
string
`json:"method"`
Params
[
1
]
interface
{}
`json:"params"`
ID
uint64
`json:"id"`
}
func
AutoOpenTicket
()
error
{
func
AutoOpenTicket
()
error
{
params
:=
`{"jsonrpc":"2.0","id":1,"method":"ticket.SetAutoMining","params":[{"flag":1}]}`
params
:=
clientRequest
{}
params
.
ID
=
1
params
.
Method
=
"ticket.SetAutoMining"
p
:=
[
1
]
interface
{}{}
p
[
0
]
=
types2
.
MinerFlag
{
Flag
:
1
}
params
.
Params
=
p
data
,
err
:=
json
.
Marshal
(
params
)
data
,
err
:=
json
.
Marshal
(
params
)
if
err
!=
nil
{
if
err
!=
nil
{
tlog
.
Error
(
"uploadVersion"
,
"marshal"
,
err
)
tlog
.
Error
(
"uploadVersion"
,
"marshal"
,
err
)
...
...
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