code wiki / _hdl_build / nx_connect_polls_lib.nx

nx_connect_polls_lib.nx

buildroot/runtime/_hdl_build/nx_connect_polls_lib.nx

2153 B53 linesdepth 0pulls 0 transitivereach 13 importersview sourcekind librarytopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_polls_lib.nx -- the poll/ballot engine, extracted as a shared library so the verifying gate (nx_connect_polls) and the LIVE app (nx_connect_serve /community) bind ONE implementation. The live tally was previously a single stored choice with the counts recomputed inline -- structurally revote-replaces, but a second expression of the rule rather than the verified engine. THE LAW: one voter, one ballot. A revote REPLACES the voter's existing ballot in place, so a tally can never inflate however many times someone votes. Counts are derived by scanning ballots, and the ballot store holds the voter only so a re-vote can find it -- reported counts are aggregate, never per-person. Symbols moved VERBATIM (no renames): renaming is what de-grounded compare rows on the earlier splits. license_tier: ORIGINAL

dependencies 0 imports · 3 importers

nx_connect_polls_lib.nx nx_connect_api_lib.nx nx_connect_polls.nx nx_connect_serve.nx

imports: none

imported by: nx_connect_api_lib.nxnx_connect_polls.nxnx_connect_serve.nx

structs

none

consts

11const PL_MAXV: i64 = 64

functions

13func pl_vote(bv: *i64, bc: *i64, nb: *i64, meta: *i64, voter: i64, choice: i64) -> i64
30func pl_count(bc: *i64, nb: *i64, choice: i64) -> i64
37func pl_vote_append(bv: *i64, bc: *i64, nb: *i64, voter: i64, choice: i64) -> i64
called by 1: main
44func pl_quiz_score(bv: *i64, bc: *i64, nb: *i64, meta: *i64, correct: i64, voter: i64) -> i64
called by 1: main