Skip to content

Commit

Permalink
Issue steemit#13 - use head_block - 3 as reference
Browse files Browse the repository at this point in the history
  • Loading branch information
pharesim authored Jun 23, 2017
1 parent 2836730 commit d110d3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions steembase/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,9 @@ def get_block_params(steem):
witness node!
"""
props = steem.get_dynamic_global_properties()
ref_block_num = props["head_block_number"] & 0xFFFF
ref_block_prefix = struct.unpack_from("<I", unhexlify(props["head_block_id"]), 4)[0]
ref_block_num = props["head_block_number"] - 3 & 0xFFFF
ref_block = ws.get_block(props["head_block_number"] - 2)
ref_block_prefix = struct.unpack_from("<I", unhexlify(ref_block["previous"]), 4)[0]
return ref_block_num, ref_block_prefix


Expand Down

0 comments on commit d110d3b

Please sign in to comment.