-
Notifications
You must be signed in to change notification settings - Fork 645
Description
Confusingly, bitcoin.rpc.Proxy.getblockhash returns raw bytes, while getbestblockhash returns the hex string, as there's no wrapper implemented for the latter. And there's probably more like this, since as noted, object conversion is not fully implemented.
I guess the question is how much risk there is to existing code of fixing it now.
Perhaps, with a sufficiently major version bump to warn of the API breakage, we should get rid of the magic __getattr__ in Proxy and de-underscore _call. Thus, only explicitly wrapped RPCs can be called directly, while others can be called such as proxy.call("getbestblockhash"). Ugly in that it kinda breaks the logic of calling it a "proxy" if you have to make such calls, but it allows new wrappers to be implemented compatibly.