Skip to content

Commit

Permalink
fix: transaction defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pdxwebdev committed Dec 18, 2023
1 parent 5f029bc commit 4d9f112
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions yadacoin/core/miningpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,11 @@ async def verify_pending_transaction(self, txn, used_sigs, check_max_inputs=Fals
elif isinstance(txn, dict):
transaction_obj = Transaction.from_dict(txn)
else:
self.config.app_log.warning("transaction unrecognizable, skipping")
return

raise Exception()
except:
self.config.app_log.warning("transaction unrecognizable, skipping")
return
try:
if (
self.config.LatestBlock.block.index + 1 >= CHAIN.TXN_V3_FORK
and transaction_obj.version < 3
Expand Down
2 changes: 1 addition & 1 deletion yadacoin/core/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def from_dict(cls, txn):
relationship=txn.get("relationship", ""),
public_key=txn.get("public_key"),
dh_public_key=txn.get("dh_public_key"),
fee=float(txn.get("fee")),
fee=float(txn.get("fee", 0)),
requester_rid=txn.get("requester_rid", ""),
requested_rid=txn.get("requested_rid", ""),
txn_hash=txn.get("hash", ""),
Expand Down

0 comments on commit 4d9f112

Please sign in to comment.