Commit 049293ed authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5108bb3d
...@@ -8,14 +8,14 @@ import ( ...@@ -8,14 +8,14 @@ import (
// 0. Address // 0. Address
func (p *Address) NEOEncode(data []byte) (int, error) { func (p *Address) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO strbytes // TODO strbytes
binary.BigEndian.PutUint16(data[0:], p.Port) binary.BigEndian.PutUint16(data[0:], p.Port)
return int(nwrote) + 2 /*, nil*/ return int(nwrote) + 2 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Address) NEODecode(data []byte) (int, error) { func (p *Address) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -38,7 +38,7 @@ overflow: ...@@ -38,7 +38,7 @@ overflow:
// 1. NodeInfo // 1. NodeInfo
func (p *NodeInfo) NEOEncode(data []byte) (int, error) { func (p *NodeInfo) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType)))
// TODO strbytes // TODO strbytes
...@@ -49,7 +49,7 @@ func (p *NodeInfo) NEOEncode(data []byte) (int, error) { ...@@ -49,7 +49,7 @@ func (p *NodeInfo) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 22 /*, nil*/ return int(nwrote) + 22 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NodeInfo) NEODecode(data []byte) (int, error) { func (p *NodeInfo) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -76,14 +76,14 @@ overflow: ...@@ -76,14 +76,14 @@ overflow:
// 2. CellInfo // 2. CellInfo
func (p *CellInfo) NEOEncode(data []byte) (int, error) { func (p *CellInfo) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.UUID)))
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.CellState))) binary.BigEndian.PutUint32(data[4:], uint32(int32(p.CellState)))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CellInfo) NEODecode(data []byte) (int, error) { func (p *CellInfo) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -97,14 +97,14 @@ overflow: ...@@ -97,14 +97,14 @@ overflow:
// 3. RowInfo // 3. RowInfo
func (p *RowInfo) NEOEncode(data []byte) (int, error) { func (p *RowInfo) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Offset) binary.BigEndian.PutUint32(data[0:], p.Offset)
// TODO slice // TODO slice
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *RowInfo) NEODecode(data []byte) (int, error) { func (p *RowInfo) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -130,13 +130,13 @@ overflow: ...@@ -130,13 +130,13 @@ overflow:
// 4. Notify // 4. Notify
func (p *Notify) NEOEncode(data []byte) (int, error) { func (p *Notify) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO strbytes // TODO strbytes
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Notify) NEODecode(data []byte) (int, error) { func (p *Notify) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -158,14 +158,14 @@ overflow: ...@@ -158,14 +158,14 @@ overflow:
// 5. Error // 5. Error
func (p *Error) NEOEncode(data []byte) (int, error) { func (p *Error) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Code) binary.BigEndian.PutUint32(data[0:], p.Code)
// TODO strbytes // TODO strbytes
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Error) NEODecode(data []byte) (int, error) { func (p *Error) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -188,12 +188,12 @@ overflow: ...@@ -188,12 +188,12 @@ overflow:
// 6. Ping // 6. Ping
func (p *Ping) NEOEncode(data []byte) (int, error) { func (p *Ping) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Ping) NEODecode(data []byte) (int, error) { func (p *Ping) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -205,12 +205,12 @@ overflow: ...@@ -205,12 +205,12 @@ overflow:
// 7. CloseClient // 7. CloseClient
func (p *CloseClient) NEOEncode(data []byte) (int, error) { func (p *CloseClient) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CloseClient) NEODecode(data []byte) (int, error) { func (p *CloseClient) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -222,7 +222,7 @@ overflow: ...@@ -222,7 +222,7 @@ overflow:
// 8. RequestIdentification // 8. RequestIdentification
func (p *RequestIdentification) NEOEncode(data []byte) (int, error) { func (p *RequestIdentification) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.ProtocolVersion) binary.BigEndian.PutUint32(data[0:], p.ProtocolVersion)
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.NodeType))) binary.BigEndian.PutUint32(data[4:], uint32(int32(p.NodeType)))
...@@ -234,7 +234,7 @@ func (p *RequestIdentification) NEOEncode(data []byte) (int, error) { ...@@ -234,7 +234,7 @@ func (p *RequestIdentification) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 22 /*, nil*/ return int(nwrote) + 22 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *RequestIdentification) NEODecode(data []byte) (int, error) { func (p *RequestIdentification) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -271,7 +271,7 @@ overflow: ...@@ -271,7 +271,7 @@ overflow:
// 9. AcceptIdentification // 9. AcceptIdentification
func (p *AcceptIdentification) NEOEncode(data []byte) (int, error) { func (p *AcceptIdentification) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType)))
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.MyUUID))) binary.BigEndian.PutUint32(data[4:], uint32(int32(p.MyUUID)))
...@@ -284,7 +284,7 @@ func (p *AcceptIdentification) NEOEncode(data []byte) (int, error) { ...@@ -284,7 +284,7 @@ func (p *AcceptIdentification) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 22 /*, nil*/ return int(nwrote) + 22 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AcceptIdentification) NEODecode(data []byte) (int, error) { func (p *AcceptIdentification) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -338,12 +338,12 @@ overflow: ...@@ -338,12 +338,12 @@ overflow:
// 10. PrimaryMaster // 10. PrimaryMaster
func (p *PrimaryMaster) NEOEncode(data []byte) (int, error) { func (p *PrimaryMaster) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *PrimaryMaster) NEODecode(data []byte) (int, error) { func (p *PrimaryMaster) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -355,13 +355,13 @@ overflow: ...@@ -355,13 +355,13 @@ overflow:
// 11. AnswerPrimary // 11. AnswerPrimary
func (p *AnswerPrimary) NEOEncode(data []byte) (int, error) { func (p *AnswerPrimary) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryUUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryUUID)))
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerPrimary) NEODecode(data []byte) (int, error) { func (p *AnswerPrimary) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -374,12 +374,12 @@ overflow: ...@@ -374,12 +374,12 @@ overflow:
// 12. AnnouncePrimary // 12. AnnouncePrimary
func (p *AnnouncePrimary) NEOEncode(data []byte) (int, error) { func (p *AnnouncePrimary) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnnouncePrimary) NEODecode(data []byte) (int, error) { func (p *AnnouncePrimary) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -391,12 +391,12 @@ overflow: ...@@ -391,12 +391,12 @@ overflow:
// 13. ReelectPrimary // 13. ReelectPrimary
func (p *ReelectPrimary) NEOEncode(data []byte) (int, error) { func (p *ReelectPrimary) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *ReelectPrimary) NEODecode(data []byte) (int, error) { func (p *ReelectPrimary) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -408,12 +408,12 @@ overflow: ...@@ -408,12 +408,12 @@ overflow:
// 14. Recovery // 14. Recovery
func (p *Recovery) NEOEncode(data []byte) (int, error) { func (p *Recovery) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Recovery) NEODecode(data []byte) (int, error) { func (p *Recovery) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -425,7 +425,7 @@ overflow: ...@@ -425,7 +425,7 @@ overflow:
// 15. AnswerRecovery // 15. AnswerRecovery
func (p *AnswerRecovery) NEOEncode(data []byte) (int, error) { func (p *AnswerRecovery) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
binary.BigEndian.PutUint64(data[8:], uint64(p.BackupTID)) binary.BigEndian.PutUint64(data[8:], uint64(p.BackupTID))
...@@ -433,7 +433,7 @@ func (p *AnswerRecovery) NEOEncode(data []byte) (int, error) { ...@@ -433,7 +433,7 @@ func (p *AnswerRecovery) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerRecovery) NEODecode(data []byte) (int, error) { func (p *AnswerRecovery) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -448,12 +448,12 @@ overflow: ...@@ -448,12 +448,12 @@ overflow:
// 16. LastIDs // 16. LastIDs
func (p *LastIDs) NEOEncode(data []byte) (int, error) { func (p *LastIDs) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *LastIDs) NEODecode(data []byte) (int, error) { func (p *LastIDs) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -465,14 +465,14 @@ overflow: ...@@ -465,14 +465,14 @@ overflow:
// 17. AnswerLastIDs // 17. AnswerLastIDs
func (p *AnswerLastIDs) NEOEncode(data []byte) (int, error) { func (p *AnswerLastIDs) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.LastOID)) binary.BigEndian.PutUint64(data[0:], uint64(p.LastOID))
binary.BigEndian.PutUint64(data[8:], uint64(p.LastTID)) binary.BigEndian.PutUint64(data[8:], uint64(p.LastTID))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerLastIDs) NEODecode(data []byte) (int, error) { func (p *AnswerLastIDs) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -486,12 +486,12 @@ overflow: ...@@ -486,12 +486,12 @@ overflow:
// 18. PartitionTable // 18. PartitionTable
func (p *PartitionTable) NEOEncode(data []byte) (int, error) { func (p *PartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *PartitionTable) NEODecode(data []byte) (int, error) { func (p *PartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -503,14 +503,14 @@ overflow: ...@@ -503,14 +503,14 @@ overflow:
// 19. AnswerPartitionTable // 19. AnswerPartitionTable
func (p *AnswerPartitionTable) NEOEncode(data []byte) (int, error) { func (p *AnswerPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerPartitionTable) NEODecode(data []byte) (int, error) { func (p *AnswerPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -548,14 +548,14 @@ overflow: ...@@ -548,14 +548,14 @@ overflow:
// 20. NotifyPartitionTable // 20. NotifyPartitionTable
func (p *NotifyPartitionTable) NEOEncode(data []byte) (int, error) { func (p *NotifyPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NotifyPartitionTable) NEODecode(data []byte) (int, error) { func (p *NotifyPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -593,14 +593,14 @@ overflow: ...@@ -593,14 +593,14 @@ overflow:
// 21. PartitionChanges // 21. PartitionChanges
func (p *PartitionChanges) NEOEncode(data []byte) (int, error) { func (p *PartitionChanges) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *PartitionChanges) NEODecode(data []byte) (int, error) { func (p *PartitionChanges) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -631,13 +631,13 @@ overflow: ...@@ -631,13 +631,13 @@ overflow:
// 22. StartOperation // 22. StartOperation
func (p *StartOperation) NEOEncode(data []byte) (int, error) { func (p *StartOperation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
(data[0:])[0] = bool2byte(p.Backup) (data[0:])[0] = bool2byte(p.Backup)
return int(nwrote) + 1 /*, nil*/ return int(nwrote) + 1 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *StartOperation) NEODecode(data []byte) (int, error) { func (p *StartOperation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -650,12 +650,12 @@ overflow: ...@@ -650,12 +650,12 @@ overflow:
// 23. StopOperation // 23. StopOperation
func (p *StopOperation) NEOEncode(data []byte) (int, error) { func (p *StopOperation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *StopOperation) NEODecode(data []byte) (int, error) { func (p *StopOperation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -667,12 +667,12 @@ overflow: ...@@ -667,12 +667,12 @@ overflow:
// 24. UnfinishedTransactions // 24. UnfinishedTransactions
func (p *UnfinishedTransactions) NEOEncode(data []byte) (int, error) { func (p *UnfinishedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *UnfinishedTransactions) NEODecode(data []byte) (int, error) { func (p *UnfinishedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -684,14 +684,14 @@ overflow: ...@@ -684,14 +684,14 @@ overflow:
// 25. AnswerUnfinishedTransactions // 25. AnswerUnfinishedTransactions
func (p *AnswerUnfinishedTransactions) NEOEncode(data []byte) (int, error) { func (p *AnswerUnfinishedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.MaxTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.MaxTID))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerUnfinishedTransactions) NEODecode(data []byte) (int, error) { func (p *AnswerUnfinishedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -716,12 +716,12 @@ overflow: ...@@ -716,12 +716,12 @@ overflow:
// 26. LockedTransactions // 26. LockedTransactions
func (p *LockedTransactions) NEOEncode(data []byte) (int, error) { func (p *LockedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *LockedTransactions) NEODecode(data []byte) (int, error) { func (p *LockedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -733,13 +733,13 @@ overflow: ...@@ -733,13 +733,13 @@ overflow:
// 27. AnswerLockedTransactions // 27. AnswerLockedTransactions
func (p *AnswerLockedTransactions) NEOEncode(data []byte) (int, error) { func (p *AnswerLockedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO map // TODO map
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) { func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -764,13 +764,13 @@ overflow: ...@@ -764,13 +764,13 @@ overflow:
// 28. FinalTID // 28. FinalTID
func (p *FinalTID) NEOEncode(data []byte) (int, error) { func (p *FinalTID) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *FinalTID) NEODecode(data []byte) (int, error) { func (p *FinalTID) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -783,13 +783,13 @@ overflow: ...@@ -783,13 +783,13 @@ overflow:
// 29. AnswerFinalTID // 29. AnswerFinalTID
func (p *AnswerFinalTID) NEOEncode(data []byte) (int, error) { func (p *AnswerFinalTID) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerFinalTID) NEODecode(data []byte) (int, error) { func (p *AnswerFinalTID) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -802,14 +802,14 @@ overflow: ...@@ -802,14 +802,14 @@ overflow:
// 30. ValidateTransaction // 30. ValidateTransaction
func (p *ValidateTransaction) NEOEncode(data []byte) (int, error) { func (p *ValidateTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *ValidateTransaction) NEODecode(data []byte) (int, error) { func (p *ValidateTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -823,13 +823,13 @@ overflow: ...@@ -823,13 +823,13 @@ overflow:
// 31. BeginTransaction // 31. BeginTransaction
func (p *BeginTransaction) NEOEncode(data []byte) (int, error) { func (p *BeginTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *BeginTransaction) NEODecode(data []byte) (int, error) { func (p *BeginTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -842,13 +842,13 @@ overflow: ...@@ -842,13 +842,13 @@ overflow:
// 32. AnswerBeginTransaction // 32. AnswerBeginTransaction
func (p *AnswerBeginTransaction) NEOEncode(data []byte) (int, error) { func (p *AnswerBeginTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) { func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -861,7 +861,7 @@ overflow: ...@@ -861,7 +861,7 @@ overflow:
// 33. FinishTransaction // 33. FinishTransaction
func (p *FinishTransaction) NEOEncode(data []byte) (int, error) { func (p *FinishTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
// TODO slice // TODO slice
...@@ -869,7 +869,7 @@ func (p *FinishTransaction) NEOEncode(data []byte) (int, error) { ...@@ -869,7 +869,7 @@ func (p *FinishTransaction) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *FinishTransaction) NEODecode(data []byte) (int, error) { func (p *FinishTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -906,14 +906,14 @@ overflow: ...@@ -906,14 +906,14 @@ overflow:
// 34. AnswerFinishTransaction // 34. AnswerFinishTransaction
func (p *AnswerFinishTransaction) NEOEncode(data []byte) (int, error) { func (p *AnswerFinishTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerFinishTransaction) NEODecode(data []byte) (int, error) { func (p *AnswerFinishTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -927,14 +927,14 @@ overflow: ...@@ -927,14 +927,14 @@ overflow:
// 35. NotifyTransactionFinished // 35. NotifyTransactionFinished
func (p *NotifyTransactionFinished) NEOEncode(data []byte) (int, error) { func (p *NotifyTransactionFinished) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID)) binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NotifyTransactionFinished) NEODecode(data []byte) (int, error) { func (p *NotifyTransactionFinished) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -948,14 +948,14 @@ overflow: ...@@ -948,14 +948,14 @@ overflow:
// 36. LockInformation // 36. LockInformation
func (p *LockInformation) NEOEncode(data []byte) (int, error) { func (p *LockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid))
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *LockInformation) NEODecode(data []byte) (int, error) { func (p *LockInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -969,13 +969,13 @@ overflow: ...@@ -969,13 +969,13 @@ overflow:
// 37. AnswerLockInformation // 37. AnswerLockInformation
func (p *AnswerLockInformation) NEOEncode(data []byte) (int, error) { func (p *AnswerLockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerLockInformation) NEODecode(data []byte) (int, error) { func (p *AnswerLockInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -988,14 +988,14 @@ overflow: ...@@ -988,14 +988,14 @@ overflow:
// 38. InvalidateObjects // 38. InvalidateObjects
func (p *InvalidateObjects) NEOEncode(data []byte) (int, error) { func (p *InvalidateObjects) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *InvalidateObjects) NEODecode(data []byte) (int, error) { func (p *InvalidateObjects) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1020,13 +1020,13 @@ overflow: ...@@ -1020,13 +1020,13 @@ overflow:
// 39. UnlockInformation // 39. UnlockInformation
func (p *UnlockInformation) NEOEncode(data []byte) (int, error) { func (p *UnlockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *UnlockInformation) NEODecode(data []byte) (int, error) { func (p *UnlockInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1039,13 +1039,13 @@ overflow: ...@@ -1039,13 +1039,13 @@ overflow:
// 40. GenerateOIDs // 40. GenerateOIDs
func (p *GenerateOIDs) NEOEncode(data []byte) (int, error) { func (p *GenerateOIDs) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.NumOIDs) binary.BigEndian.PutUint32(data[0:], p.NumOIDs)
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *GenerateOIDs) NEODecode(data []byte) (int, error) { func (p *GenerateOIDs) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1058,13 +1058,13 @@ overflow: ...@@ -1058,13 +1058,13 @@ overflow:
// 41. AnswerGenerateOIDs // 41. AnswerGenerateOIDs
func (p *AnswerGenerateOIDs) NEOEncode(data []byte) (int, error) { func (p *AnswerGenerateOIDs) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerGenerateOIDs) NEODecode(data []byte) (int, error) { func (p *AnswerGenerateOIDs) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1088,7 +1088,7 @@ overflow: ...@@ -1088,7 +1088,7 @@ overflow:
// 42. StoreObject // 42. StoreObject
func (p *StoreObject) NEOEncode(data []byte) (int, error) { func (p *StoreObject) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
binary.BigEndian.PutUint64(data[8:], uint64(p.Serial)) binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
...@@ -1120,7 +1120,7 @@ func (p *StoreObject) NEOEncode(data []byte) (int, error) { ...@@ -1120,7 +1120,7 @@ func (p *StoreObject) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 54 /*, nil*/ return int(nwrote) + 54 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *StoreObject) NEODecode(data []byte) (int, error) { func (p *StoreObject) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1170,7 +1170,7 @@ overflow: ...@@ -1170,7 +1170,7 @@ overflow:
// 43. AnswerStoreObject // 43. AnswerStoreObject
func (p *AnswerStoreObject) NEOEncode(data []byte) (int, error) { func (p *AnswerStoreObject) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
(data[0:])[0] = bool2byte(p.Conflicting) (data[0:])[0] = bool2byte(p.Conflicting)
binary.BigEndian.PutUint64(data[1:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[1:], uint64(p.Oid))
...@@ -1178,7 +1178,7 @@ func (p *AnswerStoreObject) NEOEncode(data []byte) (int, error) { ...@@ -1178,7 +1178,7 @@ func (p *AnswerStoreObject) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 17 /*, nil*/ return int(nwrote) + 17 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerStoreObject) NEODecode(data []byte) (int, error) { func (p *AnswerStoreObject) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1193,13 +1193,13 @@ overflow: ...@@ -1193,13 +1193,13 @@ overflow:
// 44. AbortTransaction // 44. AbortTransaction
func (p *AbortTransaction) NEOEncode(data []byte) (int, error) { func (p *AbortTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AbortTransaction) NEODecode(data []byte) (int, error) { func (p *AbortTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1212,7 +1212,7 @@ overflow: ...@@ -1212,7 +1212,7 @@ overflow:
// 45. StoreTransaction // 45. StoreTransaction
func (p *StoreTransaction) NEOEncode(data []byte) (int, error) { func (p *StoreTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
// TODO strbytes // TODO strbytes
...@@ -1222,7 +1222,7 @@ func (p *StoreTransaction) NEOEncode(data []byte) (int, error) { ...@@ -1222,7 +1222,7 @@ func (p *StoreTransaction) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *StoreTransaction) NEODecode(data []byte) (int, error) { func (p *StoreTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1277,13 +1277,13 @@ overflow: ...@@ -1277,13 +1277,13 @@ overflow:
// 46. VoteTransaction // 46. VoteTransaction
func (p *VoteTransaction) NEOEncode(data []byte) (int, error) { func (p *VoteTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *VoteTransaction) NEODecode(data []byte) (int, error) { func (p *VoteTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1296,7 +1296,7 @@ overflow: ...@@ -1296,7 +1296,7 @@ overflow:
// 47. GetObject // 47. GetObject
func (p *GetObject) NEOEncode(data []byte) (int, error) { func (p *GetObject) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
binary.BigEndian.PutUint64(data[8:], uint64(p.Serial)) binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
...@@ -1304,7 +1304,7 @@ func (p *GetObject) NEOEncode(data []byte) (int, error) { ...@@ -1304,7 +1304,7 @@ func (p *GetObject) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *GetObject) NEODecode(data []byte) (int, error) { func (p *GetObject) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1319,7 +1319,7 @@ overflow: ...@@ -1319,7 +1319,7 @@ overflow:
// 48. AnswerGetObject // 48. AnswerGetObject
func (p *AnswerGetObject) NEOEncode(data []byte) (int, error) { func (p *AnswerGetObject) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
binary.BigEndian.PutUint64(data[8:], uint64(p.SerialStart)) binary.BigEndian.PutUint64(data[8:], uint64(p.SerialStart))
...@@ -1350,7 +1350,7 @@ func (p *AnswerGetObject) NEOEncode(data []byte) (int, error) { ...@@ -1350,7 +1350,7 @@ func (p *AnswerGetObject) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 53 /*, nil*/ return int(nwrote) + 53 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerGetObject) NEODecode(data []byte) (int, error) { func (p *AnswerGetObject) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1399,7 +1399,7 @@ overflow: ...@@ -1399,7 +1399,7 @@ overflow:
// 49. TIDList // 49. TIDList
func (p *TIDList) NEOEncode(data []byte) (int, error) { func (p *TIDList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], p.First) binary.BigEndian.PutUint64(data[0:], p.First)
binary.BigEndian.PutUint64(data[8:], p.Last) binary.BigEndian.PutUint64(data[8:], p.Last)
...@@ -1407,7 +1407,7 @@ func (p *TIDList) NEOEncode(data []byte) (int, error) { ...@@ -1407,7 +1407,7 @@ func (p *TIDList) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 20 /*, nil*/ return int(nwrote) + 20 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *TIDList) NEODecode(data []byte) (int, error) { func (p *TIDList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1422,13 +1422,13 @@ overflow: ...@@ -1422,13 +1422,13 @@ overflow:
// 50. AnswerTIDList // 50. AnswerTIDList
func (p *AnswerTIDList) NEOEncode(data []byte) (int, error) { func (p *AnswerTIDList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerTIDList) NEODecode(data []byte) (int, error) { func (p *AnswerTIDList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1452,7 +1452,7 @@ overflow: ...@@ -1452,7 +1452,7 @@ overflow:
// 51. TIDListFrom // 51. TIDListFrom
func (p *TIDListFrom) NEOEncode(data []byte) (int, error) { func (p *TIDListFrom) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID))
binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID)) binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
...@@ -1461,7 +1461,7 @@ func (p *TIDListFrom) NEOEncode(data []byte) (int, error) { ...@@ -1461,7 +1461,7 @@ func (p *TIDListFrom) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *TIDListFrom) NEODecode(data []byte) (int, error) { func (p *TIDListFrom) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1477,13 +1477,13 @@ overflow: ...@@ -1477,13 +1477,13 @@ overflow:
// 52. AnswerTIDListFrom // 52. AnswerTIDListFrom
func (p *AnswerTIDListFrom) NEOEncode(data []byte) (int, error) { func (p *AnswerTIDListFrom) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerTIDListFrom) NEODecode(data []byte) (int, error) { func (p *AnswerTIDListFrom) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1507,13 +1507,13 @@ overflow: ...@@ -1507,13 +1507,13 @@ overflow:
// 53. TransactionInformation // 53. TransactionInformation
func (p *TransactionInformation) NEOEncode(data []byte) (int, error) { func (p *TransactionInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *TransactionInformation) NEODecode(data []byte) (int, error) { func (p *TransactionInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1526,7 +1526,7 @@ overflow: ...@@ -1526,7 +1526,7 @@ overflow:
// 54. AnswerTransactionInformation // 54. AnswerTransactionInformation
func (p *AnswerTransactionInformation) NEOEncode(data []byte) (int, error) { func (p *AnswerTransactionInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
// TODO strbytes // TODO strbytes
...@@ -1537,7 +1537,7 @@ func (p *AnswerTransactionInformation) NEOEncode(data []byte) (int, error) { ...@@ -1537,7 +1537,7 @@ func (p *AnswerTransactionInformation) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 9 /*, nil*/ return int(nwrote) + 9 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerTransactionInformation) NEODecode(data []byte) (int, error) { func (p *AnswerTransactionInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1593,7 +1593,7 @@ overflow: ...@@ -1593,7 +1593,7 @@ overflow:
// 55. ObjectHistory // 55. ObjectHistory
func (p *ObjectHistory) NEOEncode(data []byte) (int, error) { func (p *ObjectHistory) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
binary.BigEndian.PutUint64(data[8:], p.First) binary.BigEndian.PutUint64(data[8:], p.First)
...@@ -1601,7 +1601,7 @@ func (p *ObjectHistory) NEOEncode(data []byte) (int, error) { ...@@ -1601,7 +1601,7 @@ func (p *ObjectHistory) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *ObjectHistory) NEODecode(data []byte) (int, error) { func (p *ObjectHistory) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1616,14 +1616,14 @@ overflow: ...@@ -1616,14 +1616,14 @@ overflow:
// 56. AnswerObjectHistory // 56. AnswerObjectHistory
func (p *AnswerObjectHistory) NEOEncode(data []byte) (int, error) { func (p *AnswerObjectHistory) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerObjectHistory) NEODecode(data []byte) (int, error) { func (p *AnswerObjectHistory) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1652,7 +1652,7 @@ overflow: ...@@ -1652,7 +1652,7 @@ overflow:
// 57. PartitionList // 57. PartitionList
func (p *PartitionList) NEOEncode(data []byte) (int, error) { func (p *PartitionList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.MinOffset) binary.BigEndian.PutUint32(data[0:], p.MinOffset)
binary.BigEndian.PutUint32(data[4:], p.MaxOffset) binary.BigEndian.PutUint32(data[4:], p.MaxOffset)
...@@ -1660,7 +1660,7 @@ func (p *PartitionList) NEOEncode(data []byte) (int, error) { ...@@ -1660,7 +1660,7 @@ func (p *PartitionList) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 12 /*, nil*/ return int(nwrote) + 12 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *PartitionList) NEODecode(data []byte) (int, error) { func (p *PartitionList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1675,14 +1675,14 @@ overflow: ...@@ -1675,14 +1675,14 @@ overflow:
// 58. AnswerPartitionList // 58. AnswerPartitionList
func (p *AnswerPartitionList) NEOEncode(data []byte) (int, error) { func (p *AnswerPartitionList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.PTid)) binary.BigEndian.PutUint64(data[0:], uint64(p.PTid))
// TODO slice // TODO slice
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerPartitionList) NEODecode(data []byte) (int, error) { func (p *AnswerPartitionList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1720,13 +1720,13 @@ overflow: ...@@ -1720,13 +1720,13 @@ overflow:
// 59. X_NodeList // 59. X_NodeList
func (p *X_NodeList) NEOEncode(data []byte) (int, error) { func (p *X_NodeList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType)))
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *X_NodeList) NEODecode(data []byte) (int, error) { func (p *X_NodeList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1739,13 +1739,13 @@ overflow: ...@@ -1739,13 +1739,13 @@ overflow:
// 60. AnswerNodeList // 60. AnswerNodeList
func (p *AnswerNodeList) NEOEncode(data []byte) (int, error) { func (p *AnswerNodeList) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerNodeList) NEODecode(data []byte) (int, error) { func (p *AnswerNodeList) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1783,14 +1783,14 @@ overflow: ...@@ -1783,14 +1783,14 @@ overflow:
// 61. SetNodeState // 61. SetNodeState
func (p *SetNodeState) NEOEncode(data []byte) (int, error) { func (p *SetNodeState) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.UUID))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.UUID)))
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.NodeState))) binary.BigEndian.PutUint32(data[4:], uint32(int32(p.NodeState)))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *SetNodeState) NEODecode(data []byte) (int, error) { func (p *SetNodeState) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1804,13 +1804,13 @@ overflow: ...@@ -1804,13 +1804,13 @@ overflow:
// 62. AddPendingNodes // 62. AddPendingNodes
func (p *AddPendingNodes) NEOEncode(data []byte) (int, error) { func (p *AddPendingNodes) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AddPendingNodes) NEODecode(data []byte) (int, error) { func (p *AddPendingNodes) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1834,13 +1834,13 @@ overflow: ...@@ -1834,13 +1834,13 @@ overflow:
// 63. TweakPartitionTable // 63. TweakPartitionTable
func (p *TweakPartitionTable) NEOEncode(data []byte) (int, error) { func (p *TweakPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *TweakPartitionTable) NEODecode(data []byte) (int, error) { func (p *TweakPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1864,13 +1864,13 @@ overflow: ...@@ -1864,13 +1864,13 @@ overflow:
// 64. NotifyNodeInformation // 64. NotifyNodeInformation
func (p *NotifyNodeInformation) NEOEncode(data []byte) (int, error) { func (p *NotifyNodeInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO slice // TODO slice
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NotifyNodeInformation) NEODecode(data []byte) (int, error) { func (p *NotifyNodeInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1908,12 +1908,12 @@ overflow: ...@@ -1908,12 +1908,12 @@ overflow:
// 65. NodeInformation // 65. NodeInformation
func (p *NodeInformation) NEOEncode(data []byte) (int, error) { func (p *NodeInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NodeInformation) NEODecode(data []byte) (int, error) { func (p *NodeInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1925,13 +1925,13 @@ overflow: ...@@ -1925,13 +1925,13 @@ overflow:
// 66. SetClusterState // 66. SetClusterState
func (p *SetClusterState) NEOEncode(data []byte) (int, error) { func (p *SetClusterState) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *SetClusterState) NEODecode(data []byte) (int, error) { func (p *SetClusterState) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1944,13 +1944,13 @@ overflow: ...@@ -1944,13 +1944,13 @@ overflow:
// 67. ClusterInformation // 67. ClusterInformation
func (p *ClusterInformation) NEOEncode(data []byte) (int, error) { func (p *ClusterInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *ClusterInformation) NEODecode(data []byte) (int, error) { func (p *ClusterInformation) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1963,13 +1963,13 @@ overflow: ...@@ -1963,13 +1963,13 @@ overflow:
// 68. X_ClusterState // 68. X_ClusterState
func (p *X_ClusterState) NEOEncode(data []byte) (int, error) { func (p *X_ClusterState) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State))) binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *X_ClusterState) NEODecode(data []byte) (int, error) { func (p *X_ClusterState) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -1982,7 +1982,7 @@ overflow: ...@@ -1982,7 +1982,7 @@ overflow:
// 69. ObjectUndoSerial // 69. ObjectUndoSerial
func (p *ObjectUndoSerial) NEOEncode(data []byte) (int, error) { func (p *ObjectUndoSerial) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
binary.BigEndian.PutUint64(data[8:], uint64(p.LTID)) binary.BigEndian.PutUint64(data[8:], uint64(p.LTID))
...@@ -1991,7 +1991,7 @@ func (p *ObjectUndoSerial) NEOEncode(data []byte) (int, error) { ...@@ -1991,7 +1991,7 @@ func (p *ObjectUndoSerial) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *ObjectUndoSerial) NEODecode(data []byte) (int, error) { func (p *ObjectUndoSerial) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2018,13 +2018,13 @@ overflow: ...@@ -2018,13 +2018,13 @@ overflow:
// 70. AnswerObjectUndoSerial // 70. AnswerObjectUndoSerial
func (p *AnswerObjectUndoSerial) NEOEncode(data []byte) (int, error) { func (p *AnswerObjectUndoSerial) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO map // TODO map
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerObjectUndoSerial) NEODecode(data []byte) (int, error) { func (p *AnswerObjectUndoSerial) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2061,14 +2061,14 @@ overflow: ...@@ -2061,14 +2061,14 @@ overflow:
// 71. HasLock // 71. HasLock
func (p *HasLock) NEOEncode(data []byte) (int, error) { func (p *HasLock) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
binary.BigEndian.PutUint64(data[8:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[8:], uint64(p.Oid))
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *HasLock) NEODecode(data []byte) (int, error) { func (p *HasLock) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2082,14 +2082,14 @@ overflow: ...@@ -2082,14 +2082,14 @@ overflow:
// 72. AnswerHasLock // 72. AnswerHasLock
func (p *AnswerHasLock) NEOEncode(data []byte) (int, error) { func (p *AnswerHasLock) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Oid))
binary.BigEndian.PutUint32(data[8:], uint32(int32(p.LockState))) binary.BigEndian.PutUint32(data[8:], uint32(int32(p.LockState)))
return int(nwrote) + 12 /*, nil*/ return int(nwrote) + 12 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerHasLock) NEODecode(data []byte) (int, error) { func (p *AnswerHasLock) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2103,7 +2103,7 @@ overflow: ...@@ -2103,7 +2103,7 @@ overflow:
// 73. CheckCurrentSerial // 73. CheckCurrentSerial
func (p *CheckCurrentSerial) NEOEncode(data []byte) (int, error) { func (p *CheckCurrentSerial) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
binary.BigEndian.PutUint64(data[8:], uint64(p.Serial)) binary.BigEndian.PutUint64(data[8:], uint64(p.Serial))
...@@ -2111,7 +2111,7 @@ func (p *CheckCurrentSerial) NEOEncode(data []byte) (int, error) { ...@@ -2111,7 +2111,7 @@ func (p *CheckCurrentSerial) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CheckCurrentSerial) NEODecode(data []byte) (int, error) { func (p *CheckCurrentSerial) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2126,7 +2126,7 @@ overflow: ...@@ -2126,7 +2126,7 @@ overflow:
// 74. AnswerCheckCurrentSerial // 74. AnswerCheckCurrentSerial
func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) (int, error) { func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
(data[0:])[0] = bool2byte(p.Conflicting) (data[0:])[0] = bool2byte(p.Conflicting)
binary.BigEndian.PutUint64(data[1:], uint64(p.Oid)) binary.BigEndian.PutUint64(data[1:], uint64(p.Oid))
...@@ -2134,7 +2134,7 @@ func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) (int, error) { ...@@ -2134,7 +2134,7 @@ func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 17 /*, nil*/ return int(nwrote) + 17 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerCheckCurrentSerial) NEODecode(data []byte) (int, error) { func (p *AnswerCheckCurrentSerial) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2149,13 +2149,13 @@ overflow: ...@@ -2149,13 +2149,13 @@ overflow:
// 75. Pack // 75. Pack
func (p *Pack) NEOEncode(data []byte) (int, error) { func (p *Pack) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *Pack) NEODecode(data []byte) (int, error) { func (p *Pack) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2168,13 +2168,13 @@ overflow: ...@@ -2168,13 +2168,13 @@ overflow:
// 76. AnswerPack // 76. AnswerPack
func (p *AnswerPack) NEOEncode(data []byte) (int, error) { func (p *AnswerPack) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
(data[0:])[0] = bool2byte(p.Status) (data[0:])[0] = bool2byte(p.Status)
return int(nwrote) + 1 /*, nil*/ return int(nwrote) + 1 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerPack) NEODecode(data []byte) (int, error) { func (p *AnswerPack) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2187,7 +2187,7 @@ overflow: ...@@ -2187,7 +2187,7 @@ overflow:
// 77. CheckReplicas // 77. CheckReplicas
func (p *CheckReplicas) NEOEncode(data []byte) (int, error) { func (p *CheckReplicas) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
// TODO map // TODO map
binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID)) binary.BigEndian.PutUint64(data[0:], uint64(p.MinTID))
...@@ -2195,7 +2195,7 @@ func (p *CheckReplicas) NEOEncode(data []byte) (int, error) { ...@@ -2195,7 +2195,7 @@ func (p *CheckReplicas) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 16 /*, nil*/ return int(nwrote) + 16 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CheckReplicas) NEODecode(data []byte) (int, error) { func (p *CheckReplicas) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2222,7 +2222,7 @@ overflow: ...@@ -2222,7 +2222,7 @@ overflow:
// 78. CheckPartition // 78. CheckPartition
func (p *CheckPartition) NEOEncode(data []byte) (int, error) { func (p *CheckPartition) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Partition) binary.BigEndian.PutUint32(data[0:], p.Partition)
// TODO strbytes // TODO strbytes
...@@ -2233,7 +2233,7 @@ func (p *CheckPartition) NEOEncode(data []byte) (int, error) { ...@@ -2233,7 +2233,7 @@ func (p *CheckPartition) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 22 /*, nil*/ return int(nwrote) + 22 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CheckPartition) NEODecode(data []byte) (int, error) { func (p *CheckPartition) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2269,7 +2269,7 @@ overflow: ...@@ -2269,7 +2269,7 @@ overflow:
// 79. CheckTIDRange // 79. CheckTIDRange
func (p *CheckTIDRange) NEOEncode(data []byte) (int, error) { func (p *CheckTIDRange) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Partition) binary.BigEndian.PutUint32(data[0:], p.Partition)
binary.BigEndian.PutUint32(data[4:], p.Length) binary.BigEndian.PutUint32(data[4:], p.Length)
...@@ -2278,7 +2278,7 @@ func (p *CheckTIDRange) NEOEncode(data []byte) (int, error) { ...@@ -2278,7 +2278,7 @@ func (p *CheckTIDRange) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 24 /*, nil*/ return int(nwrote) + 24 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CheckTIDRange) NEODecode(data []byte) (int, error) { func (p *CheckTIDRange) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2294,7 +2294,7 @@ overflow: ...@@ -2294,7 +2294,7 @@ overflow:
// 80. AnswerCheckTIDRange // 80. AnswerCheckTIDRange
func (p *AnswerCheckTIDRange) NEOEncode(data []byte) (int, error) { func (p *AnswerCheckTIDRange) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Count) binary.BigEndian.PutUint32(data[0:], p.Count)
(data[4:])[0] = p.Checksum[0] (data[4:])[0] = p.Checksum[0]
...@@ -2321,7 +2321,7 @@ func (p *AnswerCheckTIDRange) NEOEncode(data []byte) (int, error) { ...@@ -2321,7 +2321,7 @@ func (p *AnswerCheckTIDRange) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 32 /*, nil*/ return int(nwrote) + 32 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerCheckTIDRange) NEODecode(data []byte) (int, error) { func (p *AnswerCheckTIDRange) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2355,7 +2355,7 @@ overflow: ...@@ -2355,7 +2355,7 @@ overflow:
// 81. CheckSerialRange // 81. CheckSerialRange
func (p *CheckSerialRange) NEOEncode(data []byte) (int, error) { func (p *CheckSerialRange) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Partition) binary.BigEndian.PutUint32(data[0:], p.Partition)
binary.BigEndian.PutUint32(data[4:], p.Length) binary.BigEndian.PutUint32(data[4:], p.Length)
...@@ -2365,7 +2365,7 @@ func (p *CheckSerialRange) NEOEncode(data []byte) (int, error) { ...@@ -2365,7 +2365,7 @@ func (p *CheckSerialRange) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 32 /*, nil*/ return int(nwrote) + 32 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *CheckSerialRange) NEODecode(data []byte) (int, error) { func (p *CheckSerialRange) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2382,7 +2382,7 @@ overflow: ...@@ -2382,7 +2382,7 @@ overflow:
// 82. AnswerCheckSerialRange // 82. AnswerCheckSerialRange
func (p *AnswerCheckSerialRange) NEOEncode(data []byte) (int, error) { func (p *AnswerCheckSerialRange) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Count) binary.BigEndian.PutUint32(data[0:], p.Count)
(data[4:])[0] = p.TidChecksum[0] (data[4:])[0] = p.TidChecksum[0]
...@@ -2430,7 +2430,7 @@ func (p *AnswerCheckSerialRange) NEOEncode(data []byte) (int, error) { ...@@ -2430,7 +2430,7 @@ func (p *AnswerCheckSerialRange) NEOEncode(data []byte) (int, error) {
return int(nwrote) + 60 /*, nil*/ return int(nwrote) + 60 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerCheckSerialRange) NEODecode(data []byte) (int, error) { func (p *AnswerCheckSerialRange) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2485,14 +2485,14 @@ overflow: ...@@ -2485,14 +2485,14 @@ overflow:
// 83. PartitionCorrupted // 83. PartitionCorrupted
func (p *PartitionCorrupted) NEOEncode(data []byte) (int, error) { func (p *PartitionCorrupted) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint32(data[0:], p.Partition) binary.BigEndian.PutUint32(data[0:], p.Partition)
// TODO slice // TODO slice
return int(nwrote) + 4 /*, nil*/ return int(nwrote) + 4 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *PartitionCorrupted) NEODecode(data []byte) (int, error) { func (p *PartitionCorrupted) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2517,12 +2517,12 @@ overflow: ...@@ -2517,12 +2517,12 @@ overflow:
// 84. LastTransaction // 84. LastTransaction
func (p *LastTransaction) NEOEncode(data []byte) (int, error) { func (p *LastTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *LastTransaction) NEODecode(data []byte) (int, error) { func (p *LastTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2534,13 +2534,13 @@ overflow: ...@@ -2534,13 +2534,13 @@ overflow:
// 85. AnswerLastTransaction // 85. AnswerLastTransaction
func (p *AnswerLastTransaction) NEOEncode(data []byte) (int, error) { func (p *AnswerLastTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid)) binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/ return int(nwrote) + 8 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *AnswerLastTransaction) NEODecode(data []byte) (int, error) { func (p *AnswerLastTransaction) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
...@@ -2553,12 +2553,12 @@ overflow: ...@@ -2553,12 +2553,12 @@ overflow:
// 86. NotifyReady // 86. NotifyReady
func (p *NotifyReady) NEOEncode(data []byte) (int, error) { func (p *NotifyReady) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32 var nwrote uint32
return int(nwrote) + 0 /*, nil*/ return int(nwrote) + 0 /*, nil*/
overflow: overflow:
panic() //return 0, ErrDecodeOverflow panic(0) //return 0, ErrEncodeOverflow
} }
func (p *NotifyReady) NEODecode(data []byte) (int, error) { func (p *NotifyReady) NEODecode(data []byte) (int, error) {
var nread uint32 var nread uint32
......
...@@ -213,7 +213,7 @@ func (d *decoder) generatedCode() string { ...@@ -213,7 +213,7 @@ func (d *decoder) generatedCode() string {
} }
func (e *encoder) genPrologue(recvName, typeName string) { func (e *encoder) genPrologue(recvName, typeName string) {
e.emit("func (%s *%s) NEOEncode(data []byte) (int, error) {", recvName, typeName) e.emit("func (%s *%s) NEOEncode(data []byte) int /*(int, error)*/ {", recvName, typeName)
e.emit("var nwrote uint32") e.emit("var nwrote uint32")
} }
...@@ -225,7 +225,7 @@ func (d *decoder) genPrologue(recvName, typeName string) { ...@@ -225,7 +225,7 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func (e *encoder) genEpilogue() { func (e *encoder) genEpilogue() {
e.emit("return int(nwrote) + %v /*, nil*/", e.n) e.emit("return int(nwrote) + %v /*, nil*/", e.n)
e.emit("\noverflow:") e.emit("\noverflow:")
e.emit("panic() //return 0, ErrDecodeOverflow") e.emit("panic(0) //return 0, ErrEncodeOverflow")
e.emit("}") e.emit("}")
} }
......
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