chainsync icon indicating copy to clipboard operation
chainsync copied to clipboard

chainsync.stream(['ops']) doesn't seem to work.

Open s-n-d-p opened this issue 7 years ago • 1 comments

The following example in README doesn't produce any output:-

`from chainsync import ChainSync from chainsync.adapters.steemv2 import SteemV2Adapter

adapter = SteemV2Adapter(endpoints=['https://api.steemit.com']) chainsync = ChainSync(adapter)

for dataType, data in chainsync.stream(['ops']): print("{} - {}".format(data['block_num'], data['operation_type']))`

s-n-d-p avatar May 02 '18 19:05 s-n-d-p

Sorry I missed this - you posted while I was out of commission (with a nasty cold) and didn't see it until just now.

This isn't working for me either - and I'm not entirely sure why. Enabling the debugging code on it, it looks like https://api.steemit.com is returning an empty result set for every block... it wouldn't surprise me if maybe they disabled this call on their API nodes due to it's performance.

See the output below, and note the empty result: []:

[2018-05-17 22:49:19.525459] http request - 0.092 kb / 0.203 sec - [{'jsonrpc': '2.0', 'method': 'condenser_api.get_ops_in_block', 'params': [22526479, False], 'id': 7}] []
[{'jsonrpc': '2.0', 'result': [], 'id': 7}]

I'll ask around as to what happened.

aaroncox avatar May 18 '18 02:05 aaroncox