Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Bor dd6be5bef8 chore: Make Clippy happy 2022-12-21 13:10:19 +00:00
Christian Kamm eb46a030d1 Upgrade anchor to 0.24.2 2022-05-04 13:50:50 +02:00
Christian Kamm dd51d3cbdd Renames
"unlocked_scaled_factor" was a confusing name because the value is
also used when computing vote weight for locked deposits. Rename to
"baseline_vote_weight_scaled_factor" and generally change "unlocked"
to "baseline" in several places.

Also rename "lockup_scaled_factor" to
"max_extra_lockup_vote_weight_scaled_factor" to highlight that it's just
the maximum contribution and that it's "extra" - on top of baseline.
2022-02-14 10:51:13 +01:00
Christian Kamm b7782dcd5c LogVoterInfo: Make range configurable
Previously the instruction was hardcoded to return 16 accounts. It
turned out that this number was too big for the current limits on
compute units.
2022-02-11 13:47:47 +01:00
microwavedcola1 2105e1b173
fix clippy warnings and some other deprecations (#33)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-04 09:32:55 +01:00
Christian Kamm 5b3d07ffb3 Renames for clarity
- withdrawable -> unlocked

  "withdrawable" was a bad name, since these funds - while unlocked -
  are not necessarily withdrawable if the voter is currently engaged in
  a vote.

- only_deposit -> only_unlocked

  Locked funds are technically also deposited. Make it clearer that this
  is talking about the unlocked parts of the funds on the account.
2022-01-26 09:01:17 +01:00
Christian Kamm 819038a9ae Use checked_div() more 2022-01-25 13:00:45 +01:00
Christian Kamm 22b4923ef2 Address all math issues reported by soteria
None of these should have been a real issue.
2022-01-25 13:00:45 +01:00
Christian Kamm 183626ad32 Add LogVoterInfo instruction
It has no effect on any state. It logs information about the voter and
all of its deposits to the program log. This can be used from the UI.
2022-01-19 09:04:39 +01:00