You are viewing a single comment's thread from:

RE: Notice of upcoming changes to anyx.io API

in #steem5 years ago

You've done something wrong in beem; likely you've assumed data in steem operations is always uft-8. It is not guaranteed to be so.
I believe Jussi re-formats steem data to be uft-8. This is not a good thing, it means they alter the inline data, and by doing so, the signature of the transaction will no longer match.

My implementation returns the exact result as you would get if you ran it against a steemd node directly.

A good json parser, like jq, understands things fine. Your example in jq would be:

curl -sd '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":35097419}, "id":"0"}' https://anyx.io | jq '.result.block.transactions[1].operations[0].value.title'

As you can see with this, the result is parsed correctly.

I suggest you try running beem against a steemd node directly to better debug your issue. As an example; the md5sum of the block you have is as reported as follows:

direct to steemd:
curl -sd '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":35097419}, "id":"0"}' localhost:8090 | md5sum
3708e49c94c77626f74ab4958920dc9c  -

anyx.io:
curl -sd '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":35097419}, "id":"0"}' anyx.io | md5sum
3708e49c94c77626f74ab4958920dc9c  -

api.steemit.com:
curl -sd '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":35097419}, "id":"0"}' https://api.steemit.com | md5sum
34bc46f946b44bc4863d3d6434b6c945  -
Sort:  

Thanks a lot, this will definitely help me fixing this issue on beem.

Posted using Partiko Android