Vote for non-existing proposal
It is possible to vote ( operation update_proposal_votes
) for a non-existent proposal. An account casting an invalid
vote incurs RC-costs identical to those of a valid vote.
def test_vote_for_non_exist_proposal():
node = tt.InitNode()
node.run()
wallet = tt.Wallet(attach_to=node)
# We don't have any existing proposal
assert len(wallet.api.list_proposals([""], 1000, "by_creator", "ascending", "all")) == 0
# Vote for non-existing proposal with id: 1234567890
wallet.api.update_proposal_votes(voter="initminer", proposals=[1234567890], approve=True)