Skip to content

Commit

Permalink
Merge pull request GolosChain#3 from bitfag/golos-v0.18
Browse files Browse the repository at this point in the history
Golos v0.18
  • Loading branch information
mirrorrim authored Jun 18, 2018
2 parents 5789bc1 + e97f79b commit 1d2bce0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions golos/steem.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Steem:
no_broadcast (bool): If set to ``True``, committal actions like
sending funds will have no effect (simulation only).
num_retries (int): Limit connection attempts to the node. Defaults to -1
(unlimited).
Optional Arguments (kwargs):
Args:
Expand Down
9 changes: 9 additions & 0 deletions golos/transactionbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ def sign(self):
signedtx.sign(self.wifs, chain=self.steemd.chain_params)
self["signatures"].extend(signedtx.json().get("signatures"))

def verify_authority(self):
""" Verify the authority of the signed transaction
"""
try:
if not self.steemd.verify_authority(self.json()):
raise InsufficientAuthorityError
except Exception as e:
raise e

def broadcast(self):
""" Broadcast a transaction to the Steem network
Expand Down
2 changes: 1 addition & 1 deletion golosbase/ws_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, nodes: list, **kwargs):

self.return_with_args = kwargs.get('return_with_args', False)

self.num_retries = kwargs.get("num_retries", 20)
self.num_retries = kwargs.get("num_retries", -1)
self.nodes = cycle(nodes)
self.url = ''
self.ws = None
Expand Down

0 comments on commit 1d2bce0

Please sign in to comment.