bigchaindb/tests/upsert_validator
Lev Berman 24ca0b32a9 Separate pending and effective validator updates. (#2556)
* Separate pending and effective validator updates.

- Pending validator updates do not prevent elections from concluding.
- ValidatorElection overrides has_conclude to not conclude when there is a pending update for the matching height.
- Effective validator updates deem past elections inconclusive.

* Problem: Looking for election block is inefficient.

Solution: Record placed elections, update the records upon election conclusion.

* Clarify the conclusion order in Election.process_blocks.

* Insert election records in bulk.

Otherwise, one can significantly slow nodes down by posting a whole bunch of unique elections.

* Change get_election to use find_one.

* Calculate total votes without making extra query.

* Fix the pending valset check.

* Fix election test setup.
2018-09-21 10:51:57 +02:00
..
__init__.py Problem: There is no way to add new validators (BEP-21) (#2392). 2018-07-27 17:38:24 +02:00
conftest.py Separate pending and effective validator updates. (#2556) 2018-09-21 10:51:57 +02:00
test_upsert_validator_vote.py Separate pending and effective validator updates. (#2556) 2018-09-21 10:51:57 +02:00
test_validator_election.py Create migration election class (#2535). 2018-09-17 13:59:57 +02:00