Skip to content
Snippets Groups Projects
Commit 98969bb3 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Fix for missing comment_reward_operation

- removed "limit":1000 option in enum_virtual_ops call (limit was
  causing trimming ops)
- fixed some syntax errors
parent df43edf9
No related branches found
No related tags found
5 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!16Dk issue 3 concurrent block query rebase,!15Dk issue 3 concurrent block query
......@@ -106,7 +106,7 @@ class Blocks:
val = {'hbd_payout':op_value['hbd_payout'], 'hive_payout':op_value['hive_payout'], 'vesting_payout':op_value['vesting_payout']}
elif op_type == 'comment_reward_operation':
if('payout' not in op_value or op_value['payout'] is None):
logger.error("Broken op: `{}'".format(str(op)))
log.error("Broken op: `{}'".format(str(vop)))
key = "{}/{}".format(op_value['author'], op_value['permlink'])
val = {'payout':op_value['payout'], 'author_rewards':op_value['author_rewards']}
elif op_type == 'effective_comment_vote_operation':
......
......@@ -40,10 +40,11 @@ def print_ops_stats(prefix, ops_stats):
log.info("`{}': {}".format(k, v))
log.info("############################################################################")
def prepare_vops(vops_by_block):
preparedVops = {}
for blockNum, blockDict in vops_by_block.items():
for blockNum, blockDict in vops_by_block.items():
vopsList = blockDict['ops']
date = blockDict['timestamp']
preparedVops[blockNum] = Blocks.prepare_vops(vopsList, date)
......
......@@ -174,9 +174,11 @@ class SteemClient:
resume_on_operation = 0
while from_block < to_block:
result = self.__exec('enum_virtual_ops', {"block_range_begin":from_block, "block_range_end":to_block
, "operation_begin": resume_on_operation, "limit": 1000, "filter": tracked_ops_filter
})
result = self.__exec('enum_virtual_ops',
{"block_range_begin":from_block, "block_range_end":to_block,
"operation_begin": resume_on_operation,
"filter": tracked_ops_filter
})
ops = result['ops'] if 'ops' in result else []
resume_on_operation = result['next_operation_begin'] if 'next_operation_begin' in result else 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment