Commit cc62ba6c authored by Levin Zimmermann's avatar Levin Zimmermann

first attempt to fix case where IdTime == None

certainly we need to adjust this in protogen and not in zproto-marshal,
the question is only what's the best way how this could be done..
parent 74da3738
......@@ -6,6 +6,7 @@ package proto
import (
"encoding/binary"
"math"
"reflect"
"sort"
......@@ -1281,9 +1282,14 @@ func (p *NotifyNodeInformation) neoMsgDecodeM(data []byte) (int, error) {
data = data[3:]
{
v, tail, err := msgp.ReadFloat64Bytes(data)
if err != nil {
tail, err = msgp.ReadNilBytes(data)
if err != nil {
return 0, mdecodeErr("NotifyNodeInformation.IdTime", err)
}
// see https://lab.nexedi.com/levin.zimmermann/neoppod/-/blob/4d73d206/go/neo/proto/proto.go#L352-353
v = math.Inf(-1)
}
(*a).IdTime = IdTime(v)
nread += uint64(len(data) - len(tail))
data = tail
......
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