-
Notifications
You must be signed in to change notification settings - Fork 41
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
Merged
Merged
Audit fixes #1395
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1bf57a0
(Issue No 1)
maltekliemann 965f378
Fix `log_ceil` and add extensive tests
maltekliemann cbbdf73
(Issue No 7) Enable overflow checks
maltekliemann 7258b52
(Issue No 9) Fix incorrect test
maltekliemann e226c42
(Issue No 10) Resolve FIXMEs
maltekliemann bc61a30
Fix formatting
maltekliemann 4b090cc
(Issue No 13) Remove TODO by avoiding a migration
maltekliemann 60583ac
(Issue No 13) Remove TODO by keeping low-level types
maltekliemann 3c9a691
(Issue No 13) Remove TODO by keeping low-level types
maltekliemann b899ed4
(Issue No 13) Remove already fixed TODO
maltekliemann 13dac24
(Issue No 13) Remove won't fix TODOs
maltekliemann ad3089b
(Issue No 13) Remove more TODOs, some by implementing `CheckedIncRes`
maltekliemann d15ab87
(Issue No 13) Remove code quality TODO
maltekliemann 1acd939
(Issue No 14) Define `SCHEDULE_PRIORITY`
maltekliemann 22ce8a2
(Issue No 14) Increase readability
maltekliemann 499aab6
(Issue No 14) Reuse `r_over_b`
maltekliemann 10f67cd
(Issue No 14) Add clarifying comments
maltekliemann 53cb4d1
(Issue No 14) Abstract common math code away
maltekliemann f77898f
Add missing file
maltekliemann f664336
(Issue No 2) Replace `force_max_work` with `fuel` parameter
maltekliemann 41d8752
(Issue 6) Replace `SubmitOrigin` with root
maltekliemann 2ce829b
(Issue Nos. 5 & 6) Squashed commit of the following:
maltekliemann 4f44902
Fix audit decompressor security miscellaneous comments (#1402)
Chralt98 75e5387
Merge oracles into audit fixes (#1399)
maltekliemann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
|
||
impl<T: Config> Pallet<T> { | ||
/// Evaluates `proposal` using the specified oracle and schedules the contained call if the | ||
/// oracle approves. | ||
|
@@ -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(), | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't necessary since there is no storage value that includes the asset with index "2" (CombinatorialOutcome). For more, see here.