diff --git a/.changes/1.2.0.json b/.changes/1.2.0.json new file mode 100644 index 00000000..1d706652 --- /dev/null +++ b/.changes/1.2.0.json @@ -0,0 +1,6 @@ +[ + { + "description": "Use the last irreversible block for tapos ref params", + "type": "minor" + } +] \ No newline at end of file diff --git a/.gitignore b/.gitignore index cabb6cf2..15269faa 100644 --- a/.gitignore +++ b/.gitignore @@ -65,5 +65,3 @@ target/ .ropeproject/ .pytest_cache/ .scannerwork/ - -.changes/next-release diff --git a/AUTHORS b/AUTHORS index bb094fef..52b5ccfa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,15 +1,15 @@ - 699 Fabian Schuh + 735 Fabian Schuh 154 Fabian Schuh - 77 Fabian Schuh - 24 pyup-bot + 90 Fabian Schuh + 48 pyup-bot 20 gileadmcgee + 10 jhtitor 10 user name - 9 jhtitor 8 Maurits + 5 Vladimir Kamarzin 4 bitcrab 3 Boombastic 3 Holger Nahrstaedt - 3 Vladimir Kamarzin 3 abitmore 2 Nicolas Wack 2 Scott Howard diff --git a/CHANGELOG.md b/CHANGELOG.md index 78977daa..352c9ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog Note: version releases in the 0.x.y range may introduce breaking changes. +## 1.2.0 + +- minor: Use the last irreversible block for tapos ref params + ## 1.1.20 - patch: updates from pyup diff --git a/Makefile b/Makefile index 3a33706d..893669da 100644 --- a/Makefile +++ b/Makefile @@ -46,22 +46,30 @@ docs: sphinx-apidoc -d 6 -e -f -o docs . *.py tests make -C docs clean html +docs_store: + git add docs + -git commit -m "Updating docs/" + authors: git shortlog -e -s -n > AUTHORS +authors_store: + git add AUTHORS + -git commit -m "Updating Authors" + semver: semver-release semver-updates semver-release: - semversioner release + -semversioner release semver-updates: semversioner changelog > CHANGELOG.md $(eval CURRENT_VERSION = $(shell semversioner current-version)) sed -i "s/^__version__.*/__version__ = \"$(CURRENT_VERSION)\"/" setup.py - git add .changes setup.py CHANGELOG.md - git commit -m "semverioner release updates" --no-verify - git flow release start $(CURRENT_VERSION) + -git add .changes setup.py CHANGELOG.md + -git commit -m "semverioner release updates" --no-verify + -git flow release start $(CURRENT_VERSION) git flow release finish $(CURRENT_VERSION) -prerelease: test docs authors -release: semver clean check dist upload git +prerelease: test docs docs_store authors authors_store +release: prerelease semver clean build check dist upload git diff --git a/docs/modules.rst b/docs/modules.rst index 7c868a67..b5293753 100644 --- a/docs/modules.rst +++ b/docs/modules.rst @@ -1,5 +1,5 @@ -python-graphenelib -================== +python-graphene +=============== .. toctree:: :maxdepth: 6 diff --git a/grapheneapi/rpc.py b/grapheneapi/rpc.py index e025ee94..431399ad 100644 --- a/grapheneapi/rpc.py +++ b/grapheneapi/rpc.py @@ -103,7 +103,13 @@ def parse_response(self, query): if "detail" in ret["error"]: raise RPCError(ret["error"]["detail"]) else: - raise RPCError(ret["error"]["message"]) + if ret["error"]["message"] == "Execution error": + text = ret["error"]["data"]["stack"][0]["format"] + data = ret["error"]["data"]["stack"][0]["data"] + text = text.replace("${", "{") + raise RPCError(text.format(**data)) + else: + raise RPCError(ret["error"]["message"]) else: return ret["result"] 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( - "