Open palango opened 4 years ago
TransitionResult
is already a generic:
Perhaps I misunderstood your comment?
Yeah, the problem here is that new_state
can be None
in some cases (for the transfer state machine) and is non-optional in the top-level state machine.
This leads to these problems: https://github.com/raiden-network/raiden/pull/6003/files#r395546025
Yeah, the problem here is that new_state can be None in some cases (for the transfer state machine) and is non-optional in the top-level state machine.
TransitionResult
is generic over T
, it can be Optional[InitiatorState]
for the transfer state and ChainState
for the top-level.
In #6003 we found some edge case in the typing of
TransitionResult.new_state
.As written in https://github.com/raiden-network/raiden/pull/6003/files#r395565989