pollEnded returns true when invoked with pollIDs of non-existant polls
See original GitHub issue it('should throw an error if the poll does not exist', async () => {
const plcr = await utils.getPLCRInstance();
const options = defaultOptions();
options.actor = bob;
try {
const ended = await plcr.pollEnded.call('9001'); // this returns true
assert(false, 'should have thrown error for non-existant poll #9001');
} catch (err) {
assert(utils.isEVMException(err), err.toString());
}
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
5 key things to know about the margin of error in election polls
In presidential elections, even the smallest changes in horse-race poll results seem to become imbued with deep meaning.
Read more >What to Expect on Election Day in Texas
In Texas, results from Early Voting are submitted by Texas counties and reported first, shortly after polls close on Election Night.
Read more >Forecasting a Presidential Election with Monte Carlo Simulation
Learn about how computers generate "random" numbers, and use Monte Carlo simulation to simulate the US Presidential Election using polling data.
Read more >What polling does — and doesn't — tell us | PBS NewsHour
With control of Congress at stake in this year's midterm elections, polls gauging whether people favor Republicans or Democrats are being ...
Read more >Is True the Vote Intimidating Minority Voters From Going to the ...
A former poll worker and a Democrat, she says she has voted in every election since she was 18. "Voting to me is,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good advice @yorhodes. We decided to add an explicit function for it. Doing it in
isExpired
seemed slightly non-idiomatic to that function’s purpose.https://github.com/ConsenSys/PLCRVoting/commit/b1a05e8ace28a5a6b991ba0435389a4dd73568b8
Indeed, implementing the check in
isExpired
is cleaner, and all tests pass.I like this solution! @skmgoldin, how should we proceed?