Commit 3c9e9cf0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c30669b4
...@@ -345,3 +345,28 @@ func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) { ...@@ -345,3 +345,28 @@ func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) {
p.Tid = BigEndian.Uint64(data[0:]) p.Tid = BigEndian.Uint64(data[0:])
return 8 /* + TODO variable part */, nil return 8 /* + TODO variable part */, nil
} }
func (p *FinishTransaction) NEODecode(data []byte) (int, error) {
p.Tid = BigEndian.Uint64(data[0:])
{
l := BigEndian.Uint32(data[8:])
data = data[12:]
p.OIDList = make([]neo.Oid, l)
for i := 0; i < l; i++ {
a := &p.OIDList[i]
a = BigEndian.Uint64(data[0:])
data = data[8:]
}
}
{
l := BigEndian.Uint32(data[0:])
data = data[4:]
p.CheckedList = make([]neo.Oid, l)
for i := 0; i < l; i++ {
a := &p.CheckedList[i]
a = BigEndian.Uint64(data[0:])
data = data[8:]
}
}
return 0 /* + TODO variable part */, nil
}
...@@ -358,7 +358,6 @@ type AnswerBeginTransaction struct { ...@@ -358,7 +358,6 @@ type AnswerBeginTransaction struct {
Tid Tid Tid Tid
} }
/*
// Finish a transaction. C -> PM. // Finish a transaction. C -> PM.
// Answer when a transaction is finished. PM -> C. // Answer when a transaction is finished. PM -> C.
type FinishTransaction struct { type FinishTransaction struct {
...@@ -367,6 +366,7 @@ type FinishTransaction struct { ...@@ -367,6 +366,7 @@ type FinishTransaction struct {
CheckedList []Oid CheckedList []Oid
} }
/*
type AnswerFinishTransaction struct { type AnswerFinishTransaction struct {
TTID Tid TTID Tid
Tid Tid Tid Tid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment