diff --git a/.changes/next-release/minor-20191004132521.json b/.changes/next-release/minor-20191004132521.json new file mode 100644 index 00000000..b044df30 --- /dev/null +++ b/.changes/next-release/minor-20191004132521.json @@ -0,0 +1,4 @@ +{ + "type": "minor", + "description": "Use the last irreversible block for tapos ref params" +} diff --git a/graphenebase/transactions.py b/graphenebase/transactions.py index f040ec9b..6adeaba8 100644 --- a/graphenebase/transactions.py +++ b/graphenebase/transactions.py @@ -16,17 +16,15 @@ timeformat = "%Y-%m-%dT%H:%M:%S%Z" -def getBlockParams(ws): +def getBlockParams(ws, use_head_block=False): """ Auxiliary method to obtain ``ref_block_num`` and ``ref_block_prefix``. Requires a websocket connection to a witness node! """ - dynBCParams = ws.get_dynamic_global_properties() - ref_block_num = dynBCParams["head_block_number"] & 0xFFFF - ref_block_prefix = struct.unpack_from( - "