Skip to content

Commit

Permalink
Add verify_validators option to migration msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Lacy committed Aug 3, 2022
1 parent 8288052 commit 784a796
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/tgrade-valset/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,9 @@ pub fn migrate(
if let Some(max_validators) = msg.max_validators {
cfg.max_validators = max_validators;
}
if let Some(verify_validators) = msg.verify_validators {
cfg.verify_validators = verify_validators;
}
Ok(cfg)
})?;

Expand Down
1 change: 1 addition & 0 deletions contracts/tgrade-valset/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ pub struct InstantiateResponse {
pub struct MigrateMsg {
pub min_points: Option<u64>,
pub max_validators: Option<u32>,
pub verify_validators: Option<bool>,
}

#[cfg(test)]
Expand Down
1 change: 1 addition & 0 deletions contracts/tgrade-valset/src/multitest/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fn migration_can_alter_cfg() {
&MigrateMsg {
min_points: Some(5),
max_validators: Some(10),
verify_validators: Some(true),
},
)
.unwrap();
Expand Down

0 comments on commit 784a796

Please sign in to comment.