Skip to content

Commit

Permalink
Merge pull request #3700 from anoma/grarco/fix-error-mishandling
Browse files Browse the repository at this point in the history
Propagates error from `is_proposal_accepted`
  • Loading branch information
mergify[bot] authored Aug 27, 2024
2 parents 24eebc7 + 6db4ceb commit d97f76d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .changelog/unreleased/bug-fixes/3700-fix-error-mishandling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Now we propagate the error coming from
`is_proposal_accepted` instead of falling back on a default.
([\#3700](https://github.com/anoma/namada/pull/3700))
4 changes: 1 addition & 3 deletions crates/governance/src/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ where
if is_proposal_accepted(
&self.ctx.pre(),
tx_data.tx.data(tx_data.cmt).unwrap_or_default().as_ref(),
)
.unwrap_or_default()
{
)? {
return Ok(());
}

Expand Down
4 changes: 1 addition & 3 deletions crates/governance/src/vp/pgf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ where
.data(batched_tx.cmt)
.unwrap_or_default()
.as_ref(),
)
.unwrap_or_default()
{
)? {
return Ok(());
}

Expand Down
4 changes: 1 addition & 3 deletions crates/ibc/src/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ where
.data(batched_tx.cmt)
.unwrap_or_default()
.as_ref(),
)
.unwrap_or_default()
{
)? {
return Ok(());
}

Expand Down
4 changes: 1 addition & 3 deletions crates/trans_token/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ where
if Gov::is_proposal_accepted(
&self.ctx.pre(),
tx_data.tx.data(tx_data.cmt).unwrap_or_default().as_ref(),
)
.unwrap_or_default()
{
)? {
return Ok(());
}

Expand Down

0 comments on commit d97f76d

Please sign in to comment.