-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tiago+gian/required-proposal-id' (#2365)
* tiago+gian/required-proposal-id: Changelog #2365 `prepare_proposal_data` test helper requires proposal id Fix docstr errs Make `proposal_id` a required field in gov proposals
- Loading branch information
Showing
12 changed files
with
32 additions
and
27 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/improvements/2365-required-proposal-id.md
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,2 @@ | ||
- When constructing a governance proposal the id is now a required field. | ||
([\#2365](https://github.com/anoma/namada/pull/2365)) |
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
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 |
---|---|---|
|
@@ -1814,6 +1814,7 @@ fn proposal_submission() -> Result<()> { | |
let albert = find_address(&test, ALBERT)?; | ||
let valid_proposal_json_path = prepare_proposal_data( | ||
&test, | ||
0, | ||
albert, | ||
TestWasms::TxProposalCode.read_bytes(), | ||
12, | ||
|
@@ -1886,6 +1887,7 @@ fn proposal_submission() -> Result<()> { | |
let albert = find_address(&test, ALBERT)?; | ||
let invalid_proposal_json = prepare_proposal_data( | ||
&test, | ||
1, | ||
albert, | ||
TestWasms::TxProposalCode.read_bytes(), | ||
1, | ||
|
@@ -2144,7 +2146,7 @@ fn pgf_governance_proposal() -> Result<()> { | |
}; | ||
|
||
let valid_proposal_json_path = | ||
prepare_proposal_data(&test, albert, pgf_stewards, 12); | ||
prepare_proposal_data(&test, 0, albert, pgf_stewards, 12); | ||
let validator_one_rpc = get_actor_rpc(&test, Who::Validator(0)); | ||
|
||
let submit_proposal_args = vec![ | ||
|
@@ -2333,7 +2335,7 @@ fn pgf_governance_proposal() -> Result<()> { | |
}; | ||
|
||
let valid_proposal_json_path = | ||
prepare_proposal_data(&test, albert, pgf_funding, 36); | ||
prepare_proposal_data(&test, 1, albert, pgf_funding, 36); | ||
let validator_one_rpc = get_actor_rpc(&test, Who::Validator(0)); | ||
|
||
let submit_proposal_args = vec![ | ||
|
@@ -2929,6 +2931,7 @@ fn implicit_account_reveal_pk() -> Result<()> { | |
let author = find_address(&test, source).unwrap(); | ||
let valid_proposal_json_path = prepare_proposal_data( | ||
&test, | ||
0, | ||
author, | ||
TestWasms::TxProposalCode.read_bytes(), | ||
12, | ||
|
@@ -3045,12 +3048,14 @@ fn test_epoch_sleep() -> Result<()> { | |
/// This can be submitted with "init-proposal" command. | ||
pub fn prepare_proposal_data( | ||
test: &setup::Test, | ||
id: u64, | ||
source: Address, | ||
data: impl serde::Serialize, | ||
start_epoch: u64, | ||
) -> PathBuf { | ||
let valid_proposal_json = json!({ | ||
"proposal": { | ||
"id": id, | ||
"content": { | ||
"title": "TheTitle", | ||
"authors": "[email protected]", | ||
|