This PR fixes a bug where occasionally steem-python will revert to positional argument passing when RPC methods are called with keyword arguments. The bug occurs when retrying after a failure of the server RPC connection. The existing implementation has a recursive tail call to exec but PR #86 did not update the tail call to forward the new kwargs argument.
This patch refactors the recursive tail call to use a loop instead, which has the following desirable properties:
Fixes the above-described bug
n successive connection failures do not consume n stack frames
Adding ?w=1 to the URL to suppress whitespace will make this pull request easier to review, this patch is like a textbook example of replacing recursion with iteration.
This PR fixes a bug where occasionally
steem-python
will revert to positional argument passing when RPC methods are called with keyword arguments. The bug occurs when retrying after a failure of the server RPC connection. The existing implementation has a recursive tail call toexec
but PR #86 did not update the tail call to forward the newkwargs
argument.This patch refactors the recursive tail call to use a loop instead, which has the following desirable properties:
n
successive connection failures do not consumen
stack framesAdding
?w=1
to the URL to suppress whitespace will make this pull request easier to review, this patch is like a textbook example of replacing recursion with iteration.