Commit c30669b4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 02ec3a41
...@@ -319,3 +319,29 @@ func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) { ...@@ -319,3 +319,29 @@ func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) {
} }
return 0 /* + TODO variable part */, nil return 0 /* + TODO variable part */, nil
} }
func (p *FinalTID) NEODecode(data []byte) (int, error) {
p.TTID = BigEndian.Uint64(data[0:])
return 8 /* + TODO variable part */, nil
}
func (p *AnswerFinalTID) NEODecode(data []byte) (int, error) {
p.Tid = BigEndian.Uint64(data[0:])
return 8 /* + TODO variable part */, nil
}
func (p *ValidateTransaction) NEODecode(data []byte) (int, error) {
p.TTID = BigEndian.Uint64(data[0:])
p.Tid = BigEndian.Uint64(data[8:])
return 16 /* + TODO variable part */, nil
}
func (p *BeginTransaction) NEODecode(data []byte) (int, error) {
p.Tid = BigEndian.Uint64(data[0:])
return 8 /* + TODO variable part */, nil
}
func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) {
p.Tid = BigEndian.Uint64(data[0:])
return 8 /* + TODO variable part */, nil
}
...@@ -332,7 +332,6 @@ type AnswerLockedTransactions struct { ...@@ -332,7 +332,6 @@ type AnswerLockedTransactions struct {
TidDict map[Tid]Tid // ttid -> tid TidDict map[Tid]Tid // ttid -> tid
} }
/*
// Return final tid if ttid has been committed. * -> S. C -> PM. // Return final tid if ttid has been committed. * -> S. C -> PM.
type FinalTID struct { type FinalTID struct {
TTID Tid TTID Tid
...@@ -359,6 +358,7 @@ type AnswerBeginTransaction struct { ...@@ -359,6 +358,7 @@ 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 {
......
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