Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECHOT-316] Up library patch version >> 0.1.58: Small fixes in Transaction class #10

Merged
merged 4 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions echopy/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def depth_copy(op):
@property
def finalized(self):
return self._ref_block_num is not None and self._ref_block_prefix is not None\
and self.chain_id is not None and self.has_all_fees
and self.chain_id is not None # todo: and self.has_all_fees

@property
def api(self):
Expand Down Expand Up @@ -286,19 +286,16 @@ def set_global_chain_data(self):
if self.ref_block_num is None or self.ref_block_prefix is None:
global_chain_data = self._get_dynamic_global_chain_data('2.1.0')
ref_block_prefix = self.bytes_to_int(
sorted(
bytearray(decode(global_chain_data['head_block_id'], 'hex')[4:8]),
reverse=True
)
reversed(bytearray(decode(global_chain_data['head_block_id'], 'hex')[4:8]))
)
self.ref_block_num = global_chain_data['head_block_number'] & 0xffff,
self.ref_block_num = global_chain_data['head_block_number'] & 0xffff
self.ref_block_prefix = ref_block_prefix

def sign(self, _private_key=None):
if _private_key is not None:
self.add_signer(_private_key)

if self.check_not_finalized():
if not self.finalized:
self.set_global_chain_data()

if not self.has_all_fees:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

VERSION = "0.1.57"
VERSION = "0.1.58"
packages = find_packages()
packages.remove('test')

Expand Down