-
Levin Zimmermann authored
The data type of IdTime is 'Optional[float]' [1], [2]. Before this patch the msgpack decoder could only decode 'IdTime' in case its data type was 'float'. Now it also supports the decoding of IdTime in case it is NIL. Besides the changes in 'protogen.go', this patch also relaxes the overflow check test in 'proto_test.go', which fails in its previous form after adjusting the decoding. However I don't think the exact error type should matter here: in real-usage cases we don't mind about the particular error type [3]. [1] See here, the fifth argument is IdTime: https://lab.nexedi.com/nexedi/neoppod/-/blob/3ddb6663/neo/master/handlers/identification.py#L26-27 This is found to be 'Optional[float]': https://lab.nexedi.com/nexedi/neoppod/-/blob/3ddb6663/neo/tests/protocol#L98 [2] This seems to be true for both, pre-msgpack and post-msgpack protocol, because in the pre-msgpack NEO/go there is already this note: https://lab.nexedi.com/kirr/neo/-/blob/1ad088c8/go/neo/proto/proto.go#L352-357 [3] See https://lab.nexedi.com/kirr/neo/-/blob/6fb93a60/go/neo/neonet/connection.go#L1531-1534 and https://lab.nexedi.com/kirr/neo/-/blob/6fb93a60/go/neo/neonet/connection.go#L1588-1591
4da730f5