Commit a54ac5f3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 049293ed
......@@ -14,8 +14,8 @@ func (p *Address) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint16(data[0:], p.Port)
return int(nwrote) + 2 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Address) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -48,8 +48,8 @@ func (p *NodeInfo) NEOEncode(data []byte) int /*(int, error)*/ {
float64_NEOEncode(data[14:], p.IdTimestamp)
return int(nwrote) + 22 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NodeInfo) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -82,8 +82,8 @@ func (p *CellInfo) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.CellState)))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CellInfo) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -103,8 +103,8 @@ func (p *RowInfo) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *RowInfo) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -135,8 +135,8 @@ func (p *Notify) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO strbytes
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Notify) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -164,8 +164,8 @@ func (p *Error) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO strbytes
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Error) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -192,8 +192,8 @@ func (p *Ping) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Ping) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -209,8 +209,8 @@ func (p *CloseClient) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CloseClient) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -233,8 +233,8 @@ func (p *RequestIdentification) NEOEncode(data []byte) int /*(int, error)*/ {
float64_NEOEncode(data[14:], p.IdTimestamp)
return int(nwrote) + 22 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *RequestIdentification) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -283,8 +283,8 @@ func (p *AcceptIdentification) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 22 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AcceptIdentification) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -342,8 +342,8 @@ func (p *PrimaryMaster) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *PrimaryMaster) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -360,8 +360,8 @@ func (p *AnswerPrimary) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.PrimaryUUID)))
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerPrimary) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -378,8 +378,8 @@ func (p *AnnouncePrimary) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnnouncePrimary) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -395,8 +395,8 @@ func (p *ReelectPrimary) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *ReelectPrimary) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -412,8 +412,8 @@ func (p *Recovery) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Recovery) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -432,8 +432,8 @@ func (p *AnswerRecovery) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[16:], uint64(p.TruncateTID))
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerRecovery) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -452,8 +452,8 @@ func (p *LastIDs) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *LastIDs) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -471,8 +471,8 @@ func (p *AnswerLastIDs) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.LastTID))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerLastIDs) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -490,8 +490,8 @@ func (p *PartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *PartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -509,8 +509,8 @@ func (p *AnswerPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -554,8 +554,8 @@ func (p *NotifyPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NotifyPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -599,8 +599,8 @@ func (p *PartitionChanges) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *PartitionChanges) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -636,8 +636,8 @@ func (p *StartOperation) NEOEncode(data []byte) int /*(int, error)*/ {
(data[0:])[0] = bool2byte(p.Backup)
return int(nwrote) + 1 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *StartOperation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -654,8 +654,8 @@ func (p *StopOperation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *StopOperation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -671,8 +671,8 @@ func (p *UnfinishedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *UnfinishedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -690,8 +690,8 @@ func (p *AnswerUnfinishedTransactions) NEOEncode(data []byte) int /*(int, error)
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerUnfinishedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -720,8 +720,8 @@ func (p *LockedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *LockedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -738,8 +738,8 @@ func (p *AnswerLockedTransactions) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO map
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerLockedTransactions) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -769,8 +769,8 @@ func (p *FinalTID) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *FinalTID) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -788,8 +788,8 @@ func (p *AnswerFinalTID) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerFinalTID) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -808,8 +808,8 @@ func (p *ValidateTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *ValidateTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -828,8 +828,8 @@ func (p *BeginTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *BeginTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -847,8 +847,8 @@ func (p *AnswerBeginTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerBeginTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -868,8 +868,8 @@ func (p *FinishTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *FinishTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -912,8 +912,8 @@ func (p *AnswerFinishTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerFinishTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -933,8 +933,8 @@ func (p *NotifyTransactionFinished) NEOEncode(data []byte) int /*(int, error)*/
binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NotifyTransactionFinished) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -954,8 +954,8 @@ func (p *LockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.Tid))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *LockInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -974,8 +974,8 @@ func (p *AnswerLockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Ttid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerLockInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -994,8 +994,8 @@ func (p *InvalidateObjects) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *InvalidateObjects) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1025,8 +1025,8 @@ func (p *UnlockInformation) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.TTID))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *UnlockInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1044,8 +1044,8 @@ func (p *GenerateOIDs) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], p.NumOIDs)
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *GenerateOIDs) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1063,8 +1063,8 @@ func (p *AnswerGenerateOIDs) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerGenerateOIDs) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1119,8 +1119,8 @@ func (p *StoreObject) NEOEncode(data []byte) int /*(int, error)*/ {
(data[53:])[0] = bool2byte(p.Unlock)
return int(nwrote) + 54 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *StoreObject) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1177,8 +1177,8 @@ func (p *AnswerStoreObject) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[9:], uint64(p.Serial))
return int(nwrote) + 17 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerStoreObject) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1198,8 +1198,8 @@ func (p *AbortTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AbortTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1221,8 +1221,8 @@ func (p *StoreTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *StoreTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1282,8 +1282,8 @@ func (p *VoteTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *VoteTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1303,8 +1303,8 @@ func (p *GetObject) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[16:], uint64(p.Tid))
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *GetObject) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1349,8 +1349,8 @@ func (p *AnswerGetObject) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[45:], uint64(p.DataSerial))
return int(nwrote) + 53 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerGetObject) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1406,8 +1406,8 @@ func (p *TIDList) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[16:], p.Partition)
return int(nwrote) + 20 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *TIDList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1427,8 +1427,8 @@ func (p *AnswerTIDList) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerTIDList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1460,8 +1460,8 @@ func (p *TIDListFrom) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[20:], p.Partition)
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *TIDListFrom) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1482,8 +1482,8 @@ func (p *AnswerTIDListFrom) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerTIDListFrom) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1512,8 +1512,8 @@ func (p *TransactionInformation) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *TransactionInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1536,8 +1536,8 @@ func (p *AnswerTransactionInformation) NEOEncode(data []byte) int /*(int, error)
// TODO slice
return int(nwrote) + 9 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerTransactionInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1600,8 +1600,8 @@ func (p *ObjectHistory) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[16:], p.Last)
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *ObjectHistory) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1622,8 +1622,8 @@ func (p *AnswerObjectHistory) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerObjectHistory) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1659,8 +1659,8 @@ func (p *PartitionList) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[8:], uint32(int32(p.UUID)))
return int(nwrote) + 12 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *PartitionList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1681,8 +1681,8 @@ func (p *AnswerPartitionList) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerPartitionList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1725,8 +1725,8 @@ func (p *X_NodeList) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.NodeType)))
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *X_NodeList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1744,8 +1744,8 @@ func (p *AnswerNodeList) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerNodeList) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1789,8 +1789,8 @@ func (p *SetNodeState) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[4:], uint32(int32(p.NodeState)))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *SetNodeState) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1809,8 +1809,8 @@ func (p *AddPendingNodes) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AddPendingNodes) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1839,8 +1839,8 @@ func (p *TweakPartitionTable) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *TweakPartitionTable) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1869,8 +1869,8 @@ func (p *NotifyNodeInformation) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NotifyNodeInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1912,8 +1912,8 @@ func (p *NodeInformation) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NodeInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1930,8 +1930,8 @@ func (p *SetClusterState) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *SetClusterState) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1949,8 +1949,8 @@ func (p *ClusterInformation) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *ClusterInformation) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1968,8 +1968,8 @@ func (p *X_ClusterState) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[0:], uint32(int32(p.State)))
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *X_ClusterState) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -1990,8 +1990,8 @@ func (p *ObjectUndoSerial) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *ObjectUndoSerial) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2023,8 +2023,8 @@ func (p *AnswerObjectUndoSerial) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO map
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerObjectUndoSerial) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2067,8 +2067,8 @@ func (p *HasLock) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.Oid))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *HasLock) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2088,8 +2088,8 @@ func (p *AnswerHasLock) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint32(data[8:], uint32(int32(p.LockState)))
return int(nwrote) + 12 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerHasLock) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2110,8 +2110,8 @@ func (p *CheckCurrentSerial) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[16:], uint64(p.Oid))
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CheckCurrentSerial) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2133,8 +2133,8 @@ func (p *AnswerCheckCurrentSerial) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[9:], uint64(p.Serial))
return int(nwrote) + 17 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerCheckCurrentSerial) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2154,8 +2154,8 @@ func (p *Pack) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *Pack) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2173,8 +2173,8 @@ func (p *AnswerPack) NEOEncode(data []byte) int /*(int, error)*/ {
(data[0:])[0] = bool2byte(p.Status)
return int(nwrote) + 1 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerPack) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2194,8 +2194,8 @@ func (p *CheckReplicas) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[8:], uint64(p.MaxTID))
return int(nwrote) + 16 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CheckReplicas) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2232,8 +2232,8 @@ func (p *CheckPartition) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[14:], uint64(p.MaxTID))
return int(nwrote) + 22 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CheckPartition) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2277,8 +2277,8 @@ func (p *CheckTIDRange) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[16:], uint64(p.MaxTID))
return int(nwrote) + 24 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CheckTIDRange) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2320,8 +2320,8 @@ func (p *AnswerCheckTIDRange) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[24:], uint64(p.MaxTID))
return int(nwrote) + 32 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerCheckTIDRange) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2364,8 +2364,8 @@ func (p *CheckSerialRange) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[24:], uint64(p.MinOID))
return int(nwrote) + 32 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *CheckSerialRange) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2429,8 +2429,8 @@ func (p *AnswerCheckSerialRange) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[52:], uint64(p.MaxOID))
return int(nwrote) + 60 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerCheckSerialRange) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2491,8 +2491,8 @@ func (p *PartitionCorrupted) NEOEncode(data []byte) int /*(int, error)*/ {
// TODO slice
return int(nwrote) + 4 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *PartitionCorrupted) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2521,8 +2521,8 @@ func (p *LastTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *LastTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2539,8 +2539,8 @@ func (p *AnswerLastTransaction) NEOEncode(data []byte) int /*(int, error)*/ {
binary.BigEndian.PutUint64(data[0:], uint64(p.Tid))
return int(nwrote) + 8 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *AnswerLastTransaction) NEODecode(data []byte) (int, error) {
var nread uint32
......@@ -2557,8 +2557,8 @@ func (p *NotifyReady) NEOEncode(data []byte) int /*(int, error)*/ {
var nwrote uint32
return int(nwrote) + 0 /*, nil*/
overflow:
panic(0) //return 0, ErrEncodeOverflow
/*overflow:
panic(0) */ //return 0, ErrEncodeOverflow
}
func (p *NotifyReady) NEODecode(data []byte) (int, error) {
var nread uint32
......
......@@ -143,6 +143,14 @@ func byte2bool(b byte) bool {
return b != 0
}
func bool2byte(b bool) byte {
if b {
return 1
} else {
return 0
}
}
// NOTE py.None encodes as '\xff' * 8 (-> we use NaN for None)
// NOTE '\xff' * 8 represents FP NaN but many other NaN bits representation exist
func float64_NEOEncode(b []byte, f float64) {
......
......@@ -224,8 +224,8 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func (e *encoder) genEpilogue() {
e.emit("return int(nwrote) + %v /*, nil*/", e.n)
e.emit("\noverflow:")
e.emit("panic(0) //return 0, ErrEncodeOverflow")
e.emit("\n/*overflow:")
e.emit("panic(0) */ //return 0, ErrEncodeOverflow")
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