max: remove unused parseBookEntries function

This commit is contained in:
c9s 2021-06-28 14:18:01 +08:00 committed by c9s
parent 18ccc78d83
commit 3aa6b0c13c
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -258,29 +258,6 @@ func parseBookEntries2(vals []*fastjson.Value) (entries types.PriceVolumeSlice,
return entries, err
}
// parseBookEntries parses JSON struct like `[["233330", "0.33"], ....]`
func parseBookEntries(vals []*fastjson.Value, side int, t time.Time) (entries []BookEntry, err error) {
for _, entry := range vals {
pv, err := entry.Array()
if err != nil {
return nil, err
}
if len(pv) < 2 {
return nil, ErrIncorrectBookEntryElementLength
}
entries = append(entries, BookEntry{
Side: side,
Time: t,
Price: string(pv[0].GetStringBytes()),
Volume: string(pv[1].GetStringBytes()),
})
}
return entries, nil
}
type ErrorEvent struct {
Timestamp int64
Errors []string