You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does it mean that if there is a list (1st Optional) then the list will always contain at least one element? Either 0x00 if the SignatureRequestSourceData item isn't present or 0x01 plus the SignatureRequestSourceData item?
Is the inner Optional really necessary? I have the impression that the (non-)existence of the item is already established by the serialized length of the list, and deserializing the inner Optional feels a little futile. Although I enjoyed the little mind twist :) ;)
I can't remember exactly what was the reason. I'd have to go through it all and check. The only thing that I vaguely remember might be the type checker complaining at some point.
Does it mean that if there is a list (1st Optional) then the list will always contain at least one element? Either 0x00 if the SignatureRequestSourceData item isn't present or 0x01 plus the SignatureRequestSourceData item?
I can't recall exactly if there is at least one element, but it might be the case. You might be able to find additional info in the PR above. There's some tests there that help show its usage and intent as well
Hi there!
I'm trying to deserialize this twisted little line here [1]:
message_data: Optional[list[Optional[SignatureRequestSourceData]]]
Does it mean that if there is a list (1st Optional) then the list will always contain at least one element? Either 0x00 if the SignatureRequestSourceData item isn't present or 0x01 plus the SignatureRequestSourceData item?
Is the inner Optional really necessary? I have the impression that the (non-)existence of the item is already established by the serialized length of the list, and deserializing the inner Optional feels a little futile. Although I enjoyed the little mind twist :) ;)
Kind regards
[1] https://github.com/Chia-Network/chia-blockchain/blob/main/chia/protocols/harvester_protocol.py#L95
The text was updated successfully, but these errors were encountered: