simplified fix

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-02-21 09:14:43 +01:00
parent e153a87c44
commit 99a6f9889e
No known key found for this signature in database

View File

@ -917,12 +917,9 @@ class Planetmint(object):
# elections concluded at this height
self.delete_elections(new_height)
txids = [self.get_transaction(tx_id) for tx_id in txn_ids]
txns = []
if len(txids) > 0:
for tx in txids:
if tx:
txns.append(Transaction.from_dict(tx.to_dict()))
txns = [self.get_transaction(tx_id) for tx_id in txn_ids]
txns = [Transaction.from_dict(tx.to_dict()) for tx in txns if tx]
elections = self._get_votes(txns)
for election_id in elections: