Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit fixes #1395

Open
wants to merge 22 commits into
base: develop-combo-futarchy
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1bf57a0
(Issue No 1)
maltekliemann Dec 2, 2024
965f378
Fix `log_ceil` and add extensive tests
maltekliemann Dec 2, 2024
cbbdf73
(Issue No 7) Enable overflow checks
maltekliemann Dec 2, 2024
7258b52
(Issue No 9) Fix incorrect test
maltekliemann Dec 2, 2024
e226c42
(Issue No 10) Resolve FIXMEs
maltekliemann Dec 2, 2024
bc61a30
Fix formatting
maltekliemann Dec 2, 2024
4b090cc
(Issue No 13) Remove TODO by avoiding a migration
maltekliemann Dec 3, 2024
60583ac
(Issue No 13) Remove TODO by keeping low-level types
maltekliemann Dec 3, 2024
3c9a691
(Issue No 13) Remove TODO by keeping low-level types
maltekliemann Dec 3, 2024
b899ed4
(Issue No 13) Remove already fixed TODO
maltekliemann Dec 3, 2024
13dac24
(Issue No 13) Remove won't fix TODOs
maltekliemann Dec 3, 2024
ad3089b
(Issue No 13) Remove more TODOs, some by implementing `CheckedIncRes`
maltekliemann Dec 3, 2024
d15ab87
(Issue No 13) Remove code quality TODO
maltekliemann Dec 3, 2024
1acd939
(Issue No 14) Define `SCHEDULE_PRIORITY`
maltekliemann Dec 3, 2024
22ce8a2
(Issue No 14) Increase readability
maltekliemann Dec 3, 2024
499aab6
(Issue No 14) Reuse `r_over_b`
maltekliemann Dec 3, 2024
10f67cd
(Issue No 14) Add clarifying comments
maltekliemann Dec 3, 2024
53cb4d1
(Issue No 14) Abstract common math code away
maltekliemann Dec 3, 2024
f77898f
Add missing file
maltekliemann Dec 3, 2024
f664336
(Issue No 2) Replace `force_max_work` with `fuel` parameter
maltekliemann Dec 5, 2024
41d8752
(Issue 6) Replace `SubmitOrigin` with root
maltekliemann Dec 9, 2024
2ce829b
(Issue Nos. 5 & 6) Squashed commit of the following:
maltekliemann Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion zrml/futarchy/src/pallet_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ use frame_support::{
};
use zeitgeist_primitives::traits::FutarchyOracle;

// Following Parity's implementation of pallet-democracy, we're using minimum priority for futarchy
// proposals.
const SCHEDULE_PRIORITY: u8 = 63;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use HARD_DEADLINE from frame_support::traits::schedule::HARD_DEADLINE; like here.


impl<T: Config> Pallet<T> {
/// Evaluates `proposal` using the specified oracle and schedules the contained call if the
/// oracle approves.
Expand All @@ -33,7 +37,7 @@ impl<T: Config> Pallet<T> {
let result = T::Scheduler::schedule(
DispatchTime::At(proposal.when),
None,
63,
SCHEDULE_PRIORITY,
RawOrigin::Root.into(),
proposal.call.clone(),
);
Expand Down