Skip to content

Refactor process_vote to reuse vote_inner shared vote-processing logic - #296

Open
Scepter00 wants to merge 3 commits into
Vero-protocol:mainfrom
Scepter00:fix/198-dedupe-vote-processing-logic
Open

Refactor process_vote to reuse vote_inner shared vote-processing logic#296
Scepter00 wants to merge 3 commits into
Vero-protocol:mainfrom
Scepter00:fix/198-dedupe-vote-processing-logic

Conversation

@Scepter00

Copy link
Copy Markdown

Closes #198

process_vote no longer duplicates the per-task vote-processing sequence (duplicate-vote check, task fetch, cancellation check, consensus application, resolution + vault release, persistence, event emission). It now performs only the guardian-level checks (pause, auth, reentrancy lock, guardian status, balance/threshold, reputation) and delegates the rest to vote_inner, which process_vote_batch already used. vote_inner and process_vote_batch are unchanged.

Note: I couldn't run the local test suite due to a Windows/mingw toolchain issue (dlltool.exe not found) unrelated to this change — cargo build compiles cleanly. Deferring to CI to confirm the full test suite passes.

@N-thnI

N-thnI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The only failing step is Format checkcargo fmt --check. Your logic is fine; Build & Test, coverage, cargo-audit and cargo-deny all pass.

Run cargo fmt and push. Note the repo has no rustfmt.toml (tracked as #170), so it uses default style.

@N-thnI

N-thnI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

please ensure all checks pass

@N-thnI

N-thnI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

please ensure all checks pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

process_vote and vote_inner duplicate ~90% of the same vote-processing logic

2 participants