mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: Code for approved_elections can be slightly simplified
Solution: minor refactoring
This commit is contained in:
parent
e599914f31
commit
752102842c
@ -255,9 +255,9 @@ class Election(Transaction):
|
||||
validator_set_updated = False
|
||||
validator_set_change = []
|
||||
for election_id, votes in elections.items():
|
||||
election = bigchain.get_transaction(election_id)
|
||||
election = Election.has_concluded(bigchain, election_id, votes, new_height)
|
||||
|
||||
if not election.has_concluded(bigchain, election_id, votes, new_height):
|
||||
if not election:
|
||||
continue
|
||||
|
||||
if election.makes_validator_set_change():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user