Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
20c30536
Commit
20c30536
authored
Apr 07, 2024
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! proto fix, see comment in protogen
parent
0ad51ec1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
go/neo/proto/protogen.go
go/neo/proto/protogen.go
+2
-0
go/neo/proto/zproto-marshal.go
go/neo/proto/zproto-marshal.go
+11
-10
No files found.
go/neo/proto/protogen.go
View file @
20c30536
...
@@ -1757,6 +1757,8 @@ func (d *decoderM) genStructHead(path string, typ *types.Struct, userType types.
...
@@ -1757,6 +1757,8 @@ func (d *decoderM) genStructHead(path string, typ *types.Struct, userType types.
// Addr isn't an Array/Struct but an extension type and this needs to be adjusted in proto.go?
// Addr isn't an Array/Struct but an extension type and this needs to be adjusted in proto.go?
// We need to differentiate in 'genStructHead' between them?
// We need to differentiate in 'genStructHead' between them?
d
.
resetPos
()
d
.
emit
(
"{"
)
d
.
emit
(
"{"
)
d
.
emit
(
"_, tail, err := msgp.ReadArrayHeaderBytes(data)"
)
d
.
emit
(
"_, tail, err := msgp.ReadArrayHeaderBytes(data)"
)
d
.
emit
(
"if err != nil {"
)
d
.
emit
(
"if err != nil {"
)
...
...
go/neo/proto/zproto-marshal.go
View file @
20c30536
...
@@ -1227,6 +1227,7 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -1227,6 +1227,7 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
3
]),
msgpack
.
FixArray_4
|
2
;
op
!=
opOk
{
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
3
]),
msgpack
.
FixArray_4
|
2
;
op
!=
opOk
{
return
0
,
&
mstructDecodeError
{
"NotifyNodeInformation.Addr"
,
op
,
opOk
}
return
0
,
&
mstructDecodeError
{
"NotifyNodeInformation.Addr"
,
op
,
opOk
}
}
}
data
=
data
[
3
:
]
{
{
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1234,7 +1235,6 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -1234,7 +1235,6 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
}
}
data
=
tail
data
=
tail
}
}
data
=
data
[
3
:
]
{
{
b
,
tail
,
err
:=
msgp
.
ReadBytesZC
(
data
)
b
,
tail
,
err
:=
msgp
.
ReadBytesZC
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -6935,6 +6935,7 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -6935,6 +6935,7 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
3
]),
msgpack
.
FixArray_4
|
2
;
op
!=
opOk
{
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
3
]),
msgpack
.
FixArray_4
|
2
;
op
!=
opOk
{
return
0
,
&
mstructDecodeError
{
"AnswerNodeList.Addr"
,
op
,
opOk
}
return
0
,
&
mstructDecodeError
{
"AnswerNodeList.Addr"
,
op
,
opOk
}
}
}
data
=
data
[
3
:
]
{
{
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -6942,7 +6943,6 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -6942,7 +6943,6 @@ func (p *AnswerNodeList) neoMsgDecodeM(data []byte) (int, error) {
}
}
data
=
tail
data
=
tail
}
}
data
=
data
[
3
:
]
{
{
b
,
tail
,
err
:=
msgp
.
ReadBytesZC
(
data
)
b
,
tail
,
err
:=
msgp
.
ReadBytesZC
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -8411,6 +8411,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -8411,6 +8411,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
10
]),
msgpack
.
FixArray_4
|
3
;
op
!=
opOk
{
if
op
,
opOk
:=
msgpack
.
Op
(
data
[
10
]),
msgpack
.
FixArray_4
|
3
;
op
!=
opOk
{
return
0
,
&
mstructDecodeError
{
"AnswerObjectUndoSerial"
,
op
,
opOk
}
return
0
,
&
mstructDecodeError
{
"AnswerObjectUndoSerial"
,
op
,
opOk
}
}
}
data
=
data
[
10
:
]
{
{
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
_
,
tail
,
err
:=
msgp
.
ReadArrayHeaderBytes
(
data
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -8418,21 +8419,21 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -8418,21 +8419,21 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
}
}
data
=
tail
data
=
tail
}
}
if
op
:=
msgpack
.
Op
(
data
[
1
0
]);
op
!=
msgpack
.
Bin8
{
if
op
:=
msgpack
.
Op
(
data
[
0
]);
op
!=
msgpack
.
Bin8
{
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.CurrentSerial"
,
op
,
msgpack
.
Bin8
)
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.CurrentSerial"
,
op
,
msgpack
.
Bin8
)
}
}
if
l
:=
data
[
1
1
];
l
!=
8
{
if
l
:=
data
[
1
];
l
!=
8
{
return
0
,
mdecodeLen8Err
(
"AnswerObjectUndoSerial.CurrentSerial"
,
l
,
8
)
return
0
,
mdecodeLen8Err
(
"AnswerObjectUndoSerial.CurrentSerial"
,
l
,
8
)
}
}
mv
.
CurrentSerial
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
1
2
:
]))
mv
.
CurrentSerial
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
2
:
]))
if
op
:=
msgpack
.
Op
(
data
[
2
0
]);
op
!=
msgpack
.
Bin8
{
if
op
:=
msgpack
.
Op
(
data
[
1
0
]);
op
!=
msgpack
.
Bin8
{
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.UndoSerial"
,
op
,
msgpack
.
Bin8
)
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.UndoSerial"
,
op
,
msgpack
.
Bin8
)
}
}
if
l
:=
data
[
2
1
];
l
!=
8
{
if
l
:=
data
[
1
1
];
l
!=
8
{
return
0
,
mdecodeLen8Err
(
"AnswerObjectUndoSerial.UndoSerial"
,
l
,
8
)
return
0
,
mdecodeLen8Err
(
"AnswerObjectUndoSerial.UndoSerial"
,
l
,
8
)
}
}
mv
.
UndoSerial
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
2
2
:
]))
mv
.
UndoSerial
=
zodb
.
Tid
(
binary
.
BigEndian
.
Uint64
(
data
[
1
2
:
]))
switch
op
:=
msgpack
.
Op
(
data
[
3
0
]);
op
{
switch
op
:=
msgpack
.
Op
(
data
[
2
0
]);
op
{
default
:
default
:
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.IsCurrent"
,
op
,
msgpack
.
True
,
msgpack
.
False
)
return
0
,
mdecodeOpErr
(
"AnswerObjectUndoSerial.IsCurrent"
,
op
,
msgpack
.
True
,
msgpack
.
False
)
case
msgpack
.
True
:
case
msgpack
.
True
:
...
@@ -8441,7 +8442,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
...
@@ -8441,7 +8442,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
mv
.
IsCurrent
=
false
mv
.
IsCurrent
=
false
}
}
m
[
key
]
=
mv
m
[
key
]
=
mv
data
=
data
[
3
1
:
]
data
=
data
[
2
1
:
]
}
}
}
}
return
1
+
int
(
nread
),
nil
return
1
+
int
(
nread
),
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