poanetwork / poa-dapps-voting

POA Network Governance Dapp
https://voting.poa.network
GNU General Public License v3.0
26 stars 54 forks source link

(BUG) Votes accepted and not registered until cache flushed and RPC endpoint changed #144

Closed 6proof closed 6 years ago

6proof commented 6 years ago

There was an issue with a Core Validator voting - luckily he notice the issue. Vote was cast, everything showed as accepted and successful result was returned. Luckily Validator checked Voting DApp and totals had not increased and he was able to vote again. Same response. Vote was not actually registered. After Validator cleared cache, close browser, reopened browser, changed RPC endpoint from POA Core to Sokol and then back, he was able to successfully vote and and results were recorded.

varasev commented 6 years ago

@6proof thanks for the report. As far as I understand, the progress bar (or the whole ballot card) didn't refresh after the validator left his vote. I'll check that.

The second possible reason for this is DApp could show the success message when it was not actually successful because DApp doesn't check transaction status due to https://github.com/poanetwork/poa-dapps-voting/issues/123 is not fixed yet. I'll fix that soon.

Anyway, the same validator cannot give his vote more than once for the same ballot because the smart contract doesn't allow this.

varasev commented 6 years ago

Fixed in https://github.com/poanetwork/poa-dapps-voting/pull/146.