You are viewing a single comment's thread from:

RE: One year on STEEM

in #steem7 years ago

Thanks!

https://steemian.info/witnessblocks shows it monthly. I have used a script to calculate mine:

from lightsteem.client import Client

c = Client()
acc = c.account('emrebeyler')

block_count = 0
for op in acc.history(filter=["producer_reward"], only_operation_data=False, order="asc"):
    if block_count == 0:
        print(op[1]["block"], op[1]["timestamp"])
    block_count += 1

print(block_count)
Sort:  

I got this error:

Traceback (most recent call last):
  File "blocks.py", line 1, in <module>
    from lightsteem.client import Client
  File "/usr/local/lib/python2.7/dist-packages/lightsteem/client.py", line 78
    "method": f"{self.api_type}.{method_name}",
                                             ^
SyntaxError: invalid syntax

It needs python 3.6+.

Thanks :)
It works now.