1) make enum ProposalType (with grant or grantless), and simplify checks in cancel_proposal;
2) move the remaining spaghetti code into a function in const.py, and simply pass all parameters to it from cancel_proposal, this will make vote.py much cleaner.
Two improvements can be made in vote.py:
1) make enum ProposalType (with grant or grantless), and simplify checks in cancel_proposal; 2) move the remaining spaghetti code into a function in const.py, and simply pass all parameters to it from cancel_proposal, this will make vote.py much cleaner.
In grant.py accordingly.