When an incorrect type is provided by the user for Message.timestamp or Message.next_timestamp, MsgPack will serialize an invalid MMPMessage on the wire. This leads to errors in statically typed peer actors.
Issue is fixed by explicitly converting to float in Message.init and checking again in MMPMessage.init (as the user may have assigned another value between creation of the Message and Instance.send).
Looks good. Ideally people would use mypy or an IDE that does so for them, but if they don't and pass something that cleanly converts to a float, why not?
Fixes #118
When an incorrect type is provided by the user for Message.timestamp or Message.next_timestamp, MsgPack will serialize an invalid MMPMessage on the wire. This leads to errors in statically typed peer actors.
Issue is fixed by explicitly converting to float in Message.init and checking again in MMPMessage.init (as the user may have assigned another value between creation of the Message and Instance.send).