forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pallet-referenda: Detect incorrect pre-image length (paritytech#3850)
There has been a case that a referenda failed because the length given to `submit` was incorrect. The pallet can actually check the length if the pre-image already exists to ensure that these kind of issues are not happening again.
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
title: Detect incorrect pre-image length when submitting a referenda | ||
|
||
doc: | ||
- audience: Runtime User | ||
description: | | ||
When submitting a referenda the `proposal` is passed as argument. | ||
The `proposal` is most of the time a reference to a `pre-image` and | ||
which also contains the length of the `pre-image`. This pull request | ||
adds some logic to check that if the `pre-image` already exists and if | ||
it exists, it ensures that the length is passed correctly. This prevents | ||
that the referenda can not be executed because of a mismatch of this | ||
length. | ||
|
||
crates: | ||
- name: pallet-referenda |
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