Something is wrong in test_if_proposal_votes_are_removed_after_removing_proposal
First of all this test is very slow after switching from dicts to object representation, because there is nested loop with linear search, which is quite costly:
assert not any(proposal_votes.count(vote) > 1 for vote in proposal_votes)
in get_all_proposal_votes
function
idk, why is that working quite fast on dicts, but on pydantics models it's very slow, which i fixed by appending acquired accounts to map (voter name: voter data from api), which speed up everything significally, but test stopped working. There were missing 19 votes (19981 instead of 20k votes), as i started investigation it seems, that there is missing few votes from 19 accounts, here is proof. I saved order of saving account to map in file dmp.csv, and I can't find votes for accounts in range <account-9982 : account-9999>
, which is exacly missing amount. I think this require verification of block log generation script and regeneration of block log itself. I am also attaching fixed test with commented line which duplicates border account (it simulate bug in current version of test).
PS: there is typo in file name
test_if_porposal_votes_are_removed_after_removing_propsal.py