Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
plugin
Commits
91569280
Commit
91569280
authored
Dec 26, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
ad86eb98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
exec_del_local.go
plugin/dapp/guess/executor/exec_del_local.go
+10
-11
exec_local.go
plugin/dapp/guess/executor/exec_local.go
+10
-10
table.go
plugin/dapp/guess/types/table.go
+1
-1
No files found.
plugin/dapp/guess/executor/exec_del_local.go
View file @
91569280
...
@@ -63,17 +63,17 @@ func (g *Guess) execDelLocal(receipt *types.ReceiptData) (*types.LocalDBSet, err
...
@@ -63,17 +63,17 @@ func (g *Guess) execDelLocal(receipt *types.ReceiptData) (*types.LocalDBSet, err
}
}
/*
/*
for _, log := range receiptData.Logs {
for _, log := range receiptData.Logs {
switch log.GetTy() {
switch log.GetTy() {
case gty.TyLogGuessGameStart, gty.TyLogGuessGameBet, gty.TyLogGuessGameStopBet, gty.TyLogGuessGameAbort, gty.TyLogGuessGamePublish, gty.TyLogGuessGameTimeout:
case gty.TyLogGuessGameStart, gty.TyLogGuessGameBet, gty.TyLogGuessGameStopBet, gty.TyLogGuessGameAbort, gty.TyLogGuessGamePublish, gty.TyLogGuessGameTimeout:
receiptGame := >y.ReceiptGuessGame{}
receiptGame := >y.ReceiptGuessGame{}
if err := types.Decode(log.Log, receiptGame); err != nil {
if err := types.Decode(log.Log, receiptGame); err != nil {
return nil, err
return nil, err
}
kv := g.rollbackIndex(receiptGame)
dbSet.KV = append(dbSet.KV, kv...)
}
}
kv := g.rollbackIndex(receiptGame)
}*/
dbSet.KV = append(dbSet.KV, kv...)
}
}*/
table
:=
gty
.
NewTable
(
g
.
GetLocalDB
())
table
:=
gty
.
NewTable
(
g
.
GetLocalDB
())
for
_
,
item
:=
range
receipt
.
Logs
{
for
_
,
item
:=
range
receipt
.
Logs
{
var
gameLog
gty
.
ReceiptGuessGame
var
gameLog
gty
.
ReceiptGuessGame
...
@@ -94,7 +94,6 @@ func (g *Guess) execDelLocal(receipt *types.ReceiptData) (*types.LocalDBSet, err
...
@@ -94,7 +94,6 @@ func (g *Guess) execDelLocal(receipt *types.ReceiptData) (*types.LocalDBSet, err
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kvs
...
)
dbSet
.
KV
=
append
(
dbSet
.
KV
,
kvs
...
)
}
}
return
dbSet
,
nil
return
dbSet
,
nil
}
}
...
...
plugin/dapp/guess/executor/exec_local.go
View file @
91569280
...
@@ -62,18 +62,18 @@ func (g *Guess) execLocal(receipt *types.ReceiptData) (*types.LocalDBSet, error)
...
@@ -62,18 +62,18 @@ func (g *Guess) execLocal(receipt *types.ReceiptData) (*types.LocalDBSet, error)
}
}
/*
/*
for i := 0; i < len(receipt.Logs); i++ {
for i := 0; i < len(receipt.Logs); i++ {
item := receipt.Logs[i]
item := receipt.Logs[i]
if item.Ty >= gty.TyLogGuessGameStart && item.Ty <= gty.TyLogGuessGameTimeout {
if item.Ty >= gty.TyLogGuessGameStart && item.Ty <= gty.TyLogGuessGameTimeout {
var Gamelog gty.ReceiptGuessGame
var Gamelog gty.ReceiptGuessGame
err := types.Decode(item.Log, &Gamelog)
err := types.Decode(item.Log, &Gamelog)
if err != nil {
if err != nil {
panic(err) //数据错误了,已经被修改了
panic(err) //数据错误了,已经被修改了
}
kv := g.updateIndex(&Gamelog)
dbSet.KV = append(dbSet.KV, kv...)
}
}
kv := g.updateIndex(&Gamelog)
dbSet.KV = append(dbSet.KV, kv...)
}
}
}
*/
*/
table
:=
gty
.
NewTable
(
g
.
GetLocalDB
())
table
:=
gty
.
NewTable
(
g
.
GetLocalDB
())
...
...
plugin/dapp/guess/types/table.go
View file @
91569280
...
@@ -68,7 +68,7 @@ func (tx *GuessRow) Get(key string) ([]byte, error) {
...
@@ -68,7 +68,7 @@ func (tx *GuessRow) Get(key string) ([]byte, error) {
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
Addr
,
tx
.
Status
)),
nil
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
Addr
,
tx
.
Status
)),
nil
}
else
if
key
==
"admin"
{
}
else
if
key
==
"admin"
{
return
[]
byte
(
tx
.
AdminAddr
),
nil
return
[]
byte
(
tx
.
AdminAddr
),
nil
}
else
if
key
==
"admin_status"
{
}
else
if
key
==
"admin_status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
AdminAddr
,
tx
.
Status
)),
nil
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
AdminAddr
,
tx
.
Status
)),
nil
}
else
if
key
==
"category_status"
{
}
else
if
key
==
"category_status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
Category
,
tx
.
Status
)),
nil
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
Category
,
tx
.
Status
)),
nil
...
...
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