Skip to content

Commit

Permalink
Merge pull request #344 from NashMiao/master
Browse files Browse the repository at this point in the history
 fix deploy bug
  • Loading branch information
NashMiao authored Jun 1, 2019
2 parents 0d15704 + b9ce889 commit 8fc570d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ontology/core/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __iter__(self):
data['gasPrice'] = self.gas_price
data['gasLimit'] = self.gas_limit
data['payer'] = Address(self.payer).b58encode()
data['payload'] = bytes.hex(self.payload)
data['payload'] = bytearray.hex(self.payload)
data['attributes'] = bytearray.hex(self.attributes)
data['sigs'] = list()
for sig in self.sig_list:
Expand All @@ -103,7 +103,7 @@ def serialize_unsigned(self, is_str: bool = False) -> bytes or str:
writer.write_uint64(self.gas_limit)
writer.write_bytes(self.payer)
self.serialize_exclusive_data(writer)
if self.payload is not None:
if self.payload is not None and len(self.payload) != 0:
writer.write_var_bytes(bytes(self.payload))
writer.write_var_int(len(self.attributes))
ms.flush()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hd_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def setUp(self):
'tomorrow stable casual write adult bean wisdom give duty sound blanket vanish grab junior crystal duck advice print tail purse orient',
'modify moon weird cloud crane grace cheap useless canoe fashion also cement zebra amount pink ocean saddle art fun jewel smooth upon abandon network']
self.master_keys = list()
for i, m in enumerate(self.mnemonic_lst):
for _, m in enumerate(self.mnemonic_lst):
self.master_keys.append(HDPrivateKey.master_key_from_mnemonic(m))
self.hex_master_keys = ['99c7b4ef1a126c4efd84decaa918c45d90f87f8eaba0d32bb113a7f3e4118162',
'652c39c190b87677211729c3cb73e9bb18867cd26145fb8a6088bd1c9b10b566',
Expand Down

0 comments on commit 8fc570d

Please sign in to comment.