Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
77a69df1
Commit
77a69df1
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7fc32050
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
21 deletions
+29
-21
go/neo/proto.go
go/neo/proto.go
+4
-2
go/neo/py/pyneo-gen-testdata
go/neo/py/pyneo-gen-testdata
+8
-2
go/neo/zproto-marshal.go
go/neo/zproto-marshal.go
+12
-12
go/neo/ztestdata_proto_py_test.go
go/neo/ztestdata_proto_py_test.go
+5
-5
No files found.
go/neo/proto.go
View file @
77a69df1
...
@@ -511,7 +511,8 @@ type InvalidateObjects struct {
...
@@ -511,7 +511,8 @@ type InvalidateObjects struct {
}
}
// Unlock information on a transaction. PM -> S.
// Unlock information on a transaction. PM -> S.
type
UnlockInformation
struct
{
// XXX -> InformationUnlocked?
type
NotifyUnlockInformation
struct
{
TTID
zodb
.
Tid
TTID
zodb
.
Tid
}
}
...
@@ -528,7 +529,8 @@ type AnswerNewOIDs struct {
...
@@ -528,7 +529,8 @@ type AnswerNewOIDs struct {
// Ask master to generate a new TTID that will be used by the client
// Ask master to generate a new TTID that will be used by the client
// to rebase a transaction. S -> PM -> C
// to rebase a transaction. S -> PM -> C
type
Deadlock
struct
{
// XXX -> Deadlocked?
type
NotifyDeadlock
struct
{
TTid
zodb
.
Tid
TTid
zodb
.
Tid
LockingTid
zodb
.
Tid
LockingTid
zodb
.
Tid
}
}
...
...
go/neo/py/pyneo-gen-testdata
View file @
77a69df1
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
# pyname -> goname
# pyname -> goname
renames
=
{}
renames
=
{}
def
noask
(
name
):
def
noask
(
name
):
renames
[
'Ask'
+
name
]
=
name
renames
[
'Ask
'
+
name
]
=
name
def
nonotify
(
name
):
renames
[
'Notify
'
+
name
]
=
name
noask
(
'Recovery'
)
noask
(
'Recovery'
)
noask
(
'LastIDs'
)
noask
(
'LastIDs'
)
...
@@ -35,6 +35,12 @@ noask('FinalTID')
...
@@ -35,6 +35,12 @@ noask('FinalTID')
noask
(
'BeginTransaction'
)
noask
(
'BeginTransaction'
)
noask
(
'FinishTransaction'
)
noask
(
'FinishTransaction'
)
noask
(
'LockInformation'
)
noask
(
'LockInformation'
)
#nonotify('UnlockInformation') # XXX ok?
noask
(
'RebaseTransaction'
)
noask
(
'RebaseObject'
)
noask
(
'StoreObject'
)
noask
(
'StoreTransaction'
)
noask
(
'VoteTransaction'
)
def
main
():
def
main
():
...
...
go/neo/zproto-marshal.go
View file @
77a69df1
...
@@ -1316,21 +1316,21 @@ overflow:
...
@@ -1316,21 +1316,21 @@ overflow:
return
0
,
ErrDecodeOverflow
return
0
,
ErrDecodeOverflow
}
}
// 35. UnlockInformation
// 35.
Notify
UnlockInformation
func
(
*
UnlockInformation
)
neoMsgCode
()
uint16
{
func
(
*
Notify
UnlockInformation
)
neoMsgCode
()
uint16
{
return
35
return
35
}
}
func
(
p
*
UnlockInformation
)
neoMsgEncodedLen
()
int
{
func
(
p
*
Notify
UnlockInformation
)
neoMsgEncodedLen
()
int
{
return
8
return
8
}
}
func
(
p
*
UnlockInformation
)
neoMsgEncode
(
data
[]
byte
)
{
func
(
p
*
Notify
UnlockInformation
)
neoMsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTID
))
}
}
func
(
p
*
UnlockInformation
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Notify
UnlockInformation
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
8
{
if
uint32
(
len
(
data
))
<
8
{
goto
overflow
goto
overflow
}
}
...
@@ -1414,22 +1414,22 @@ overflow:
...
@@ -1414,22 +1414,22 @@ overflow:
return
0
,
ErrDecodeOverflow
return
0
,
ErrDecodeOverflow
}
}
// 38. Deadlock
// 38.
Notify
Deadlock
func
(
*
Deadlock
)
neoMsgCode
()
uint16
{
func
(
*
Notify
Deadlock
)
neoMsgCode
()
uint16
{
return
38
return
38
}
}
func
(
p
*
Deadlock
)
neoMsgEncodedLen
()
int
{
func
(
p
*
Notify
Deadlock
)
neoMsgEncodedLen
()
int
{
return
16
return
16
}
}
func
(
p
*
Deadlock
)
neoMsgEncode
(
data
[]
byte
)
{
func
(
p
*
Notify
Deadlock
)
neoMsgEncode
(
data
[]
byte
)
{
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
0
:
],
uint64
(
p
.
TTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
binary
.
BigEndian
.
PutUint64
(
data
[
8
:
],
uint64
(
p
.
LockingTid
))
}
}
func
(
p
*
Deadlock
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
func
(
p
*
Notify
Deadlock
)
neoMsgDecode
(
data
[]
byte
)
(
int
,
error
)
{
if
uint32
(
len
(
data
))
<
16
{
if
uint32
(
len
(
data
))
<
16
{
goto
overflow
goto
overflow
}
}
...
@@ -3474,10 +3474,10 @@ var msgTypeRegistry = map[uint16]reflect.Type{
...
@@ -3474,10 +3474,10 @@ var msgTypeRegistry = map[uint16]reflect.Type{
32
:
reflect
.
TypeOf
(
LockInformation
{}),
32
:
reflect
.
TypeOf
(
LockInformation
{}),
33
|
answerBit
:
reflect
.
TypeOf
(
AnswerInformationLocked
{}),
33
|
answerBit
:
reflect
.
TypeOf
(
AnswerInformationLocked
{}),
34
:
reflect
.
TypeOf
(
InvalidateObjects
{}),
34
:
reflect
.
TypeOf
(
InvalidateObjects
{}),
35
:
reflect
.
TypeOf
(
UnlockInformation
{}),
35
:
reflect
.
TypeOf
(
Notify
UnlockInformation
{}),
36
:
reflect
.
TypeOf
(
AskNewOIDs
{}),
36
:
reflect
.
TypeOf
(
AskNewOIDs
{}),
37
|
answerBit
:
reflect
.
TypeOf
(
AnswerNewOIDs
{}),
37
|
answerBit
:
reflect
.
TypeOf
(
AnswerNewOIDs
{}),
38
:
reflect
.
TypeOf
(
Deadlock
{}),
38
:
reflect
.
TypeOf
(
Notify
Deadlock
{}),
39
:
reflect
.
TypeOf
(
RebaseTransaction
{}),
39
:
reflect
.
TypeOf
(
RebaseTransaction
{}),
40
|
answerBit
:
reflect
.
TypeOf
(
AnswerRebaseTransaction
{}),
40
|
answerBit
:
reflect
.
TypeOf
(
AnswerRebaseTransaction
{}),
41
:
reflect
.
TypeOf
(
RebaseObject
{}),
41
:
reflect
.
TypeOf
(
RebaseObject
{}),
...
...
go/neo/ztestdata_proto_py_test.go
View file @
77a69df1
...
@@ -27,12 +27,12 @@ var pyMsgRegistry = map[uint16]string{
...
@@ -27,12 +27,12 @@ var pyMsgRegistry = map[uint16]string{
35
:
"NotifyUnlockInformation"
,
35
:
"NotifyUnlockInformation"
,
36
:
"AskNewOIDs"
,
36
:
"AskNewOIDs"
,
38
:
"NotifyDeadlock"
,
38
:
"NotifyDeadlock"
,
39
:
"
Ask
RebaseTransaction"
,
39
:
"RebaseTransaction"
,
41
:
"
Ask
RebaseObject"
,
41
:
"RebaseObject"
,
43
:
"
Ask
StoreObject"
,
43
:
"StoreObject"
,
45
:
"AbortTransaction"
,
45
:
"AbortTransaction"
,
46
:
"
Ask
StoreTransaction"
,
46
:
"StoreTransaction"
,
48
:
"
Ask
VoteTransaction"
,
48
:
"VoteTransaction"
,
50
:
"AskObject"
,
50
:
"AskObject"
,
52
:
"AskTIDs"
,
52
:
"AskTIDs"
,
54
:
"AskTransactionInformation"
,
54
:
"AskTransactionInformation"
,
...
...
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