steemit / simple_steem_client

A minimalist Steem RPC client in Python
2 stars 5 forks source link

TN: HF20: Update to work with appbase #22

Closed relativityboy closed 6 years ago

relativityboy commented 6 years ago

As a python developer, I want simple steem to be able to connect to HF20 & appbase steemds.

AC

feruzm commented 6 years ago

Result

It does support Appbase instances and from what I can see mostly built for Appbase. Also has backward compatibility to pre-appbase instances. Very light and well-written, took me some time to review and figure out how it works, but I really like it. 👍

backend = SteemRemoteBackend(nodes=["https://api.steemit.com"], appbase=True)
res = backend.rpc_call(api="jsonrpc",method="get_methods")
print("res:", json.dumps(res, separators=(",", ":")))

I would strongly suggest to use this and will leave comment on why to following issue: https://github.com/steemit/tinman/issues/62

relativityboy commented 6 years ago

Excellent.

inertia186 commented 6 years ago

Nope. Found a problem. Looks like operation_variants.py is not appbase ready.

It is currently using tuples and needs to switch to object.

~This blocks testing PR https://github.com/steemit/tinman/pull/63 (https://github.com/steemit/tinman/issues/60).~

feruzm commented 6 years ago

Yes, but it is not used in client of this library, I don't think it is ever used by tinman either. So it is likely leftover code, imo.

inertia186 commented 6 years ago

Yeah, I think you're right. While investigating this, I found that all of the operations in question are part of tinman, not constructed by simple_steem_client. So I have made a new commit with the required changes on tinman and unblocked: https://github.com/steemit/tinman/pull/63/commits/b578bff345bcbbe165ff1ecc058b5e1dd491b78c

I'll close this. If we want to remove left over code, it can be done in a new issue.